An information query method, system, device, medium and product
By externally storing GCS information and simulating its service in the Ray cluster's information query system, the problem of information loss caused by master node restart was solved, and the reliability and readability of information query were improved.
Patent Information
- Application Number
- CN202410840781.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-06-26
AI Technical Summary
When the master node of the Ray cluster restarts, the information stored in GCS is lost, making it impossible to troubleshoot jobs and affecting the reliability and readability of information queries.
An information query system is provided, including an interaction module, a service simulation module, and a data storage module. By storing GCS information inside and outside the master node and simulating GCS services using the service simulation module, the reliability and readability of information queries are ensured.
After the master node restarts, the information query function can be effectively restored, improving the reliability and readability of information queries and avoiding the problem of poor query experience caused by information loss.
Smart Images

Figure CN118689920B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an information retrieval method, system, device, medium, or product. Background Technology
[0002] Ray is an open-source distributed computing framework for building high-performance parallel and distributed applications. Ray's goal is to make distributed computing transparent to developers while providing high performance.
[0003] Additionally, Ray can run on Kubernetes, with each Ray cluster consisting of a master node and multiple worker nodes. The master node serves as the entry point to the Ray cluster, allowing users to submit tasks and retrieve results. This master node is responsible for managing and coordinating the worker nodes and possesses at least task scheduling, resource management, fault detection, and fault recovery capabilities. The worker nodes execute specific computational tasks in parallel under the master node's management; each worker node also deploys a local service, such as the Raylet service, enabling communication between the worker node and the master node, such as receiving tasks and providing feedback on task execution results.
[0004] In addition, Ray's main features include those described in ①-④ below.
[0005] ① It is simple and easy to use, specifically because Ray provides a simple set of application programming interfaces (APIs) to enable developers to easily build and run distributed applications.
[0006] ② High performance, specifically: Ray uses a technique called dynamic task graph, which enables Ray to effectively schedule and execute parallel tasks, thereby achieving high performance.
[0007] ③ Versatility, specifically: Ray can be used not only to build data processing and machine learning applications, but also to build any application that requires parallel and distributed computing.
[0008] ④ Elasticity, specifically: Ray can continue to run even if a node fails, enabling Ray to operate in large-scale distributed environments.
[0009] Furthermore, the master node in a Ray cluster has a Global Control Store (GCS) deployed on it. This GCS stores information relevant to executing a job using the Ray cluster, allowing users to troubleshoot the job using this information. However, in some cases, the master node may restart due to reasons such as a failure, causing the information stored in its GCS to be lost, thus making job troubleshooting impossible. Summary of the Invention
[0010] To address the aforementioned technical problems, this application provides an information retrieval method, system, device, medium, and product.
[0011] To achieve the above objectives, the technical solution provided in this application is as follows:
[0012] This application provides an information query method, which is applied to a service simulation module in an information query system. The service simulation module is used to simulate at least one service provided by a global information storage system (GCS), which is deployed in the master node of a cluster.
[0013] The method includes:
[0014] Receive a query request sent by the interaction module in the information query system. The query request is generated based on a query operation triggered by the interaction module. The query request is used to request information about one or more objects.
[0015] The query result corresponding to the query request is determined using the information stored in the data storage module of the information query system; the information stored in the data storage module is obtained by externally storing the information stored in the GCS; the information stored in the data storage module includes information about one or more objects;
[0016] The query results are sent to the interaction module, which is used to display the query results.
[0017] In one possible implementation, the process of determining the query result includes:
[0018] The query request is parsed to generate a query task, which is to query information about one or more objects from the data storage module;
[0019] Execute the query task to obtain information about one or more objects;
[0020] The information of one or more objects is processed to obtain the query result corresponding to the query request.
[0021] In one possible implementation, the information query system includes a service simulation module corresponding to multiple candidate version identifiers;
[0022] The query request carries a target version identifier, and the plurality of candidate version identifiers include the target version identifier;
[0023] The method is applied to the service simulation module corresponding to the target version identifier.
[0024] In one possible implementation, the default state of the service simulation module corresponding to each candidate version identifier is the off state;
[0025] Before receiving the query request sent by the interaction module in the information query system, the method further includes:
[0026] Start the service simulation module corresponding to the target version identifier;
[0027] After sending the query result to the interaction module, the method further includes:
[0028] Shut down the service simulation module corresponding to the target version identifier.
[0029] In one possible implementation, the information stored in the data storage module includes log information, which is obtained by externally storing some or all of the log files in the cluster.
[0030] And / or,
[0031] The information stored in the data storage module includes the state information of at least one object. For any object, the state information of the object is stored in the data storage module by overwriting the old state information with new state information, so that the state information of the object stored in the data storage module can be used to represent the latest state of the object.
[0032] In one possible implementation, the object is a cluster, job, service, stateful task, or stateless task.
[0033] This application provides an information query system, which includes an interaction module, a service simulation module, and a data storage module;
[0034] The interaction module is used to generate a query request based on the query operation triggered by the interaction module. The query request is used to request information about one or more objects.
[0035] The service simulation module is used to receive query requests sent by the interaction module; determine the query result corresponding to the query request using the information stored in the data storage module; and send the query result to the interaction module. The service simulation module is used to simulate at least one service provided by the Global Information Memory (GCS), which is deployed in the master node of the cluster. The information stored in the data storage module is obtained by externally storing the information stored in the GCS. The information stored in the data storage module includes information about one or more objects.
[0036] The interactive module is also used to display the query results.
[0037] This application provides an electronic device, the device comprising: a processor and a memory;
[0038] The memory is used to store instructions or computer programs;
[0039] The processor is configured to execute the instructions or computer program in the memory, so that the electronic device performs the information query method provided in this application.
[0040] This application provides a computer-readable medium storing instructions or computer programs that, when executed on a device, cause the device to perform the information query method provided in this application.
[0041] This application provides a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the information query method provided in this application.
[0042] Compared with related technologies, this application has at least the following advantages:
[0043] The information query system independent of the Ray cluster provided in this application includes an interaction module, a service simulation module, and a data storage module. The system works as follows: First, the interaction module generates a query request based on the query operation triggered by the interaction module, so that the query request can be used to query information of one or more objects; then, the interaction module sends the query request to the service simulation module, so that the service simulation module can use the information stored in the data storage module to determine the query result corresponding to the query request; finally, the service simulation module sends the query result to the interaction module for display.
[0044] Specifically, the information stored in the data storage module is obtained by externally storing the information stored in the GCS deployed within the Ray cluster's master node. This ensures that the information stored in the data storage module includes the information stored in the GCS and is unaffected by the master node's restart. Consequently, after the master node restarts, the information stored in the data storage module can be used for job troubleshooting, effectively resolving the problem of information loss caused by the GCS being lost after the master node restarts.
[0045] In addition, since the service simulation module is used to simulate at least one service provided by GCS deployed in the Ray cluster, so that the services provided by the service simulation module are consistent with some services provided by GCS, the service simulation module can better parse the information stored in the data storage module, thereby making the data finally displayed to the user more readable. This can effectively avoid the defect of poor readability caused by directly displaying the information stored in the data storage module, thus improving the information query experience. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 A schematic diagram of a Ray cluster provided in an embodiment of this application;
[0048] Figure 2 A schematic diagram of a GCS in-memory process provided for an embodiment of this application;
[0049] Figure 3 A schematic diagram of a GCS provided for an embodiment of this application;
[0050] Figure 4 A flowchart illustrating an information query method provided in this application embodiment;
[0051] Figure 5 A schematic diagram of an information query process provided in an embodiment of this application;
[0052] Figure 6 A schematic diagram illustrating another information query process provided in an embodiment of this application;
[0053] Figure 7 A schematic diagram of an external storage process provided in an embodiment of this application;
[0054] Figure 8 This is a schematic diagram of the structure of an information query system provided in an embodiment of this application;
[0055] Figure 9 A schematic diagram of a log reading link provided in an embodiment of this application;
[0056] Figure 10 This is a schematic diagram of the structure of an information query system provided in an embodiment of this application;
[0057] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0058] To facilitate a better understanding of the technical solutions provided in this application, some technical terms involved in this application are introduced below.
[0059] Ray is a distributed computing framework invented to provide a general API for distributed systems. It aims to automate all tasks through simple yet universal abstract programming methods. Based on this concept, Ray's designers made it tightly integrated with Python, enabling business logic to be handled with minimal code.
[0060] In addition, Ray uses components such as distributed reference counting and distributed memory, which increase the complexity of the architecture but are necessary for performance and reliability.
[0061] Furthermore, Ray is built on the high-performance Google Remote Procedure Call (GRPC) protocol and, in many cases, performs comparably to direct GRPC calls. Compared to using GRPC alone, Ray makes it easier for applications to leverage parallel and distributed execution, distributed memory sharing (via shared memory object storage), and dynamically create lightweight services (such as calling Actors via GRPC).
[0062] Furthermore, to improve reliability, Ray's internal protocols are designed to ensure that correctness during failures incurs only very low performance overhead. Ray implements a distributed reference counting protocol to ensure memory safety and aid in recovery from failures.
[0063] Furthermore, Ray users are encouraged to consider how to use resources rather than machines, allowing Ray applications to easily scale from laptops to clusters without any code changes. Ray's distributed scheduler and object manager are designed to achieve this seamless scaling with low overhead.
[0064] A Ray cluster refers to a cluster running the Ray distributed computing framework, such as... Figure 1 The Ray cluster shown is a Ray cluster consisting of multiple nodes, such as a master node and at least one worker node, and each node includes the contents shown in (1)-(6) below.
[0065] (1) One or more worker processes are responsible for submitting and executing tasks. Worker processes are either stateless or stateful, such as actors.
[0066] (2) An ownership table, which records system metadata of the objects referenced by the worker, such as the location of the object.
[0067] (3) In-process storage, which stores some small objects.
[0068] (4) raylet, which is used to manage shared resources on each node. Unlike worker processes, raylet is shared across all nodes.
[0069] (5) Scheduler, which is responsible for resource management, task placement and completion, and storing task parameters in a distributed ObjectStore.
[0070] (6) ObjectStore, also known as PlasmaObjectStore, is a shared memory storage system responsible for storage, etc. It should be noted that the various ObjectStores in the Ray cluster collectively construct Ray's distributed storage.
[0071] A task is a function that is invoked remotely, executing on different processes of the caller or on different machines. Tasks can be stateless or stateful (such as Actors).
[0072] An object refers to a value required by the application, which is either returned by a task or created via ray.put. These objects cannot be modified once created.
[0073] An Actor is a stateful worker process. An Actor's tasks are submitted to a specified instance in a specific way, and the internal state of the Actor can be modified during execution.
[0074] Driver refers to the root or main program of a program, generally referring to the application containing the code in ray.init.
[0075] A Job is a collection of Tasks and Actors from the same Driver. A Job is a logical concept, meaning the collection of all generated Tasks and resulting states involved in running user-side code once.
[0076] Additionally, the information involved in executing a job using a Ray cluster can include Job information, Servant information, Actor information, Task information, and Log information. Job information refers to relevant information about the job, such as status information, ensuring that it includes information about all tasks within the job. Servant information describes the service used by the job, such as offline or online service. Actor information refers to information about stateful tasks involved in the job. Task information refers to information about stateless tasks involved in the job. Log information describes the logs related to the job and the logs generated by the cluster during the job's execution.
[0077] Furthermore, the information shown above, such as Job information, Servant information, Actor information, Task information, and Log information, can all be stored in GCS. In open-source solutions, Job information, Servant information, and Actor information can be persisted to GCS's remote dictionary server (Redis), such as... Figure 2 The example shown is in Redis; however, because the Task information is quite large, it will not be persisted to Redis; the Log information will be stored on the local disk. It should be noted that Redis is an open-source, content-based, high-performance key-value database, and it supports various data structures such as strings, lists, sets, hashes, and sorted sets.
[0078] GCS is a global, persistent key-value store used to store metadata related to the Ray cluster, such as task, object, resource, and node information. Furthermore, GCS is a core component of the Ray cluster, enabling Ray to perform efficient task scheduling and object management on large-scale clusters, thus facilitating high-performance distributed computing. In addition, ... Figure 3 As shown, the services provided by GCS include at least the services described in (a) to (vi) below.
[0079] (i) The service that stores task information specifically: GCS stores information about all tasks, including task parameters, return values, status, etc. This allows Ray to re-execute tasks when they fail, or to retrieve task results after completion.
[0080] (ii) The service that stores object information is as follows: GCS stores the metadata of all objects involved in Ray, including size, location, reference count, etc., so that Ray can effectively manage and schedule objects.
[0081] (iii) The service of storing resources and node information, specifically: GCS stores the cluster's resources and node information, including the resource capacity, current usage, status and other information of each node, so that Ray can perform effective resource scheduling and load balancing.
[0082] (iv) Provide event subscription and publishing services, specifically: GCS provides event subscription and publishing functions, enabling Ray's various components to communicate and coordinate by subscribing to and publishing events.
[0083] (v) Query request parsing service, which is as follows: GCS can parse and process the query request triggered by the user to obtain the corresponding task, so that the GCS can subsequently query the information requested by the user from the information stored in the GCS by executing the task.
[0084] (vi) Data parsing service, specifically: GCS can parse and process the information stored in GCS to make the parsed information more readable, thus effectively avoiding defects caused by poor readability of the information stored in GCS.
[0085] Research has revealed that, for open-source solutions, the GCS deployed within the Ray cluster's master node stores information related to the execution of each job, such as Job information, Servant information, Actor information, Task information, and Log information, allowing users to query data using the GCS. However, in some situations, such as Ray cluster release or master node failure, the information stored in the GCS may be lost, leading to problems such as the inability to troubleshoot.
[0086] Based on this, in order to solve the problems mentioned above, this application provides an information query system and corresponding information query method independent of the Ray cluster. The system includes an interaction module, a service simulation module, and a data storage module. The information query method includes: first, the interaction module generates a query request based on a query operation triggered by the interaction module, so that the query request is used to query one or more objects, such as information about a job; then, the interaction module sends the query request to the service simulation module, so that the service simulation module uses the information stored in the data storage module to determine the query result corresponding to the query request; finally, the service simulation module sends the query result to the interaction module for display.
[0087] Specifically, the information stored in the data storage module is obtained by externally storing the information stored in the GCS deployed within the Ray cluster's master node. This ensures that the information stored in the data storage module includes the information stored in the GCS and is unaffected by the master node's restart. Consequently, after the master node restarts, the information stored in the data storage module can be used for job troubleshooting, effectively resolving the problem of information loss caused by the GCS being lost after the master node restarts.
[0088] In addition, since the service simulation module is used to simulate at least one service provided by GCS deployed in the Ray cluster, so that the services provided by the service simulation module are consistent with some services provided by GCS, the service simulation module can better parse the information stored in the data storage module, thereby making the data finally displayed to the user more readable. This can effectively avoid the defect of poor readability caused by directly displaying the information stored in the data storage module, thus improving the information query experience.
[0089] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0090] To better understand the technical solution provided in this application, the information retrieval method provided in this application will be explained below with reference to some accompanying drawings. For example... Figure 4As shown, when an information query system independent of the Ray cluster includes an interaction module, a service simulation module, and a data storage module, the information query method applied to this information query system provided in this application embodiment includes S1-S3 as follows. Wherein, the Figure 4 This is a flowchart of an information query method provided in an embodiment of this application.
[0091] S1: The service simulation module receives a query request sent by the interaction module. The query request is generated based on the query operation triggered by the interaction module. The query request is used to request information about one or more objects. The service simulation module is used to simulate at least one service provided by GCS, which is deployed in the master node of the cluster.
[0092] Among them, the information query system is used to provide users with some data query services, such as querying the historical status information of a certain Ray cluster, querying relevant information about a certain job executed by the Ray cluster, etc.
[0093] Furthermore, to better reduce resource consumption, the information query system can serve multiple Ray clusters, allowing users to access historical information for each cluster, such as the status of a Ray cluster executing a job and the logs of a job executed by a Ray cluster. As an example, when the information query system serves N Ray clusters, such as... Figure 5 When clusters 1 to N are shown, this information query system can be used to record information about these N Ray clusters in real time. This allows users to retrieve information about the nth Ray cluster using its identifier, where n is a positive integer, n ≤ N, and N is a positive integer. The identifier (IdentityDocument, ID) of the nth Ray cluster uniquely identifies it.
[0094] The information of the nth Ray cluster refers to the information involved when executing a job using the nth Ray cluster. This information can include all information related to the nth Ray cluster up to the current time, thus representing the status of the nth Ray cluster when processing each job, such as the resource usage of the nth Ray cluster and the execution status of the job. Furthermore, this application does not limit the implementation method of the information of the nth Ray cluster; for example, it may include at least one or more of Job information, Service information, Actor information, Task information, and Log information.
[0095] For the interactive module in the information query system, the interactive module is used to provide interactive services to users so that the interactive module can at least detect certain operations triggered by users, such as query operations, so that the interactive module can subsequently show the user the feedback results for the operation, such as the query results corresponding to the query operation.
[0096] Furthermore, this application does not limit the implementation method of the interaction module. For example, the interaction module may at least include an interactive page. This interactive page is used to implement the interaction process with the user, enabling it to at least display certain information to the user and receive certain actions triggered by the user. As another example, the interaction module may employ... Figure 6-9 The interactive module shown is implemented.
[0097] Furthermore, the interaction module can generate a corresponding request based on the user's triggered action, so that the request can represent the user's needs. Therefore, in one possible implementation, the interaction module is at least used to: generate a query request based on a query action triggered by the interaction module, so that the query request can represent the query needs described by the query action. Here, the query action refers to the action triggered when a user wants to query certain information. The query request is used to request information about one or more objects.
[0098] It should be noted that this application does not limit the implementation method of the objects in "information of one or more objects" above. For example, if a user wants to query information about a Ray cluster, the object can be the Ray cluster; if a user wants to query information about a job executed by a Ray cluster, the object can be the job; if a user wants to query information about the service used when a Ray cluster executes a job, the object can be the service; if a user wants to query information about a stateless task executed by a Ray cluster, the object can be the stateless task; if a user wants to query information about a stateful task executed by a Ray cluster, such as an Actor, the object can be the stateful task. Therefore, in one possible implementation, the objects in "information of one or more objects" above can be clusters, jobs, services, stateful tasks, or stateless tasks.
[0099] It should also be noted that, for an object, the information of that object refers to information related to that object, such as status information, log information, etc., so that the information of that object can describe the information that has been generated for that object as comprehensively as possible, such as status information, log information, etc., so that the information of that object can better represent the content that the object has experienced up to the current time.
[0100] For the service simulation module in the information query system, this module is built based on the GCS deployed within the Ray cluster. This allows the service simulation module to simulate at least one service provided by the GCS, such as request parsing and data parsing services. This enables the service simulation module to assist the information query system in better implementing the data query process. In one possible implementation, when the GCS is used to provide at least query request parsing and storage data parsing services, the service simulation module is used to simulate at least these two services. This ensures that the query request parsing service provided by the service simulation module is consistent with that provided by the GCS, and the storage data parsing service provided by the service simulation module is consistent with that provided by the GCS. This consistency ensures that the services provided by the service simulation module are consistent with the corresponding services provided by the GCS, resulting in better readability of the query results obtained through the service simulation module. This effectively overcomes the drawback of poor readability that occurs when information stored externally within the GCS is still stored within the GCS, thus improving query performance.
[0101] As can be seen, in one possible implementation, the service simulation module described above is used to simulate at least one service provided by GCS. Here, GCS refers to a component deployed within the Ray cluster, and GCS satisfies the following constraints: the GCS is deployed within the master node of the cluster; the cluster is used to run a preset distributed computing framework; the cluster includes one master node and multiple worker nodes; the GCS is a storage system deployed within the cluster; and the GCS is used to store metadata involved in the cluster running the preset distributed computing framework. Here, the preset distributed computing framework is Ray.
[0102] Based on the relevant content of S1 above, for an information query system, if the interaction module in the information query system detects a query operation triggered by a user, the interaction module first generates a query request based on the query operation so that the query request can represent the query requirements described by the query operation; then the interaction module sends the query request to the service simulation module in the information query system so that the service simulation module can perform corresponding data query processing based on the query request.
[0103] S2: The service simulation module uses the information stored in the data storage module to determine the query result corresponding to the query request; the information stored in the data storage module is obtained by externally storing the information stored in GCS; the information stored in the data storage module includes information about one or more objects.
[0104] Among them, the data storage module refers to the module existing in the information query system used for external storage of information stored within the GCS, such as... Figures 6-9 The data storage module shown is configured to store information that includes at least the information stored within the GCS, so that even if information is lost in the GCS, the user can use the data storage module to ascertain what information was stored in the GCS. Therefore, in one possible implementation, the data storage module can, to some extent, simulate the storage function of the GCS, allowing it to store the information stored within the GCS in a certain manner.
[0105] In addition, since GCS can be used to store information involved in executing a job using a Ray cluster, such as Job information, Serve information, Actor information, Task information, and Log information, the information stored in the data storage module includes "information involved in executing a job using a Ray cluster," so that users can query this information later using the data storage module.
[0106] Therefore, in one possible implementation, the information stored in the data storage module can include information about at least one or more objects. For any given object, the information refers to the information related to that object when a job is executed using the Ray cluster, such as status information and logs. Furthermore, for any object, such as a job or task, the object's status information describes its state when a job is executed using the Ray cluster, such as waiting for processing, processing started, processing in progress, processing completed, or execution failed.
[0107] In reality, because the state of an object is constantly changing, the state information obtained for the same object at different times may differ. Furthermore, because the most recent state of an object better describes its execution progress and thus has higher usage value, this application provides a method for storing the object's state information to save storage resources. In this method, the object's state information is stored in the data storage module by overwriting old state information with new state information. This ensures that the state information stored in the data storage module represents the object's latest actual state, allowing the data storage module to store only information describing the object's latest state and excluding information describing the object's historical state. This effectively avoids resource overhead and information interference caused by storing the object's historical state, thereby improving data query efficiency.
[0108] In reality, an object's information may include multiple types, such as Job information, Servant information, Actor information, Task information, and Log information. Therefore, to improve query efficiency, this application also provides a storage method for the object's information. In this method, when the object's information includes M types of information, the data storage module stores the m-th type of information as the m-th data to obtain the m-th storage database, where m is a positive integer, m≤M, and M is a positive integer. This allows for quick location of the corresponding database for querying based on the information type carried in the query request, thus improving efficiency. Here, the information type refers to the type of information requested by the query request, and this application does not limit the method of obtaining this information type; for example, it can be specified by the user or automatically determined by the interaction module based on user-triggered operations. The m-th storage refers to the storage method required when storing the m-th type of information. This application does not limit the implementation method of the m-th storage. For example, if the m-th type of information is Actor information, then the m-th storage is a storage method pre-set for the Actor information; if the m-th type of information is log information, then the m-th storage is a storage method pre-set for the log information, such as object storage and / or distributed file system (Hadoop Distributed File System, HDFS), etc.; ...
[0109] In another possible implementation, the information stored in the data storage module may include at least log information. This log information refers to logs generated when a job is executed using the Ray cluster, such as log information stored by GCS on its local disk. Therefore, when GCS stores log information on its local disk, this log information can be externally stored in the data storage module in real time, so that the log information can be retrieved from the data storage module if GCS loses information.
[0110] It's important to note that the log write process in the open-source solution works as follows: the Ray cluster periodically scans for newly added error log files. If any are found, the new log content is read and stored in GCS. This allows GCS to store log content as real-time as possible. Similarly, the job log read process in the open-source solution involves finding the `submission_id` in GCS based on the job ID and assembling it according to the format "job-driver-{submission_id}.log".
[0111] Furthermore, to better present the situation during job execution, this application provides a method for storing log information. Specifically, this method involves periodically traversing all log files under the log path corresponding to the Ray cluster to determine if any new log files exist. If so, the newly added log content is retrieved and externally stored in the data storage module in an append-only manner, ensuring that the log information stored in the data storage module includes all log files involved in the Ray cluster. It should be noted that this application does not limit the implementation of this storage method. For example, it could involve modifying the logic of the `check_log_files_and_publish_updates` method in `log_monitor.py` to incrementally upload log content to the TOS (Tera Online System). Alternatively, the logic for uploading to the TOS could involve traversing all log files under the log path, scanning for any newly added log files, and if so, reading the newly added log file and appending it to the external storage.
[0112] Accordingly, in response to the log storage method described above, this application also provides a log reading method, which specifically involves: first searching the data storage module for the identifier of the object requiring log querying, such as a job ID or task ID; then searching the data storage module for the log information corresponding to that identifier. It can be seen that, as... Figure 9 As shown, when the data storage module uses the first storage to record log information and the second storage to record the identifiers of each object, the log reading method can be as follows: first, obtain the identifier of the object with log query requirements from the second storage; then, search for the log information corresponding to the identifier from the first storage.
[0113] Based on the above log content, in one possible implementation, the log information stored in the data storage module can be obtained by externally storing some or all of the log files in the cluster, so that the log information stored in the data storage module can describe the state when a job is executed using the Ray cluster as detailed as possible, such as the resource usage status in the cluster, the job execution status, etc.
[0114] Furthermore, since the log information is quite large and older log information has low usage value, log information collected earlier can be periodically deleted from the data storage module in order to reduce resource consumption.
[0115] Furthermore, this application does not limit the implementation method of the data storage module. For example, the data storage module can use MySQL to store Job information, Servant information, Actor information, Task information, and Log information.
[0116] Furthermore, this application does not limit the implementation of S2 above. For example, it can specifically be: first, the service simulation module parses the query request and generates a query task, so that the query task is "to query the information of one or more objects from the data storage module"; then, the service simulation module executes the query task to obtain the information of one or more objects; then, the service simulation module processes the information of one or more objects to obtain the query result corresponding to the query request.
[0117] It should be noted that this application does not limit the implementation of the above-mentioned step of "processing the information of one or more objects to obtain the query result corresponding to the query request". For example, it can specifically be: the service simulation module parses and processes the information to obtain the information parsing result, so that the readability of the information parsing result is higher than the readability of the information itself, so that the query result corresponding to the query request can be generated based on the information parsing result, so that the query result can be presented in a certain way, such as a visualization method.
[0118] Furthermore, this application does not limit the implementation method of data transmission between the service simulation module and the interaction module. For example, in some scenarios, to better improve the query effect, different interfaces can be configured for different data, such as... Figure 8 The various APIs shown enable data transmission between the service simulation module and the interaction module through different interfaces for different data query requests. As can be seen, in one possible implementation, after the interaction module receives a query request, it can first determine the interface corresponding to the query request; then, through this interface, it sends the query request to the service simulation module. This allows the service simulation module to parse and process the query request using the parsing rules corresponding to the interface, obtaining a query task. Subsequently, when the service simulation module executes the query task, it retrieves information from the database corresponding to the interface to obtain the query result corresponding to the query request.
[0119] Based on the relevant content of S2 above, for the information query system, after the service simulation module of the information query system receives the query request sent by the interaction module of the information query system, the service simulation module can use the information stored in the data storage module of the information query system to determine the query result corresponding to the query request. In this way, the defects that exist when GCS loses information can be overcome by using external storage.
[0120] S3: The service simulation module sends the query results to the interaction module, which is used to display the query results.
[0121] In this application, for an information query system, after the service simulation module in the information query system obtains the query results, the service simulation module can send the query results to the interaction module in the information query system so that the interaction module can display the query results to the user.
[0122] Based on the content of S1 to S3 above, the information query method provided in this application includes: first, the interaction module generates a query request based on the query operation triggered by the interaction module, so that the query request is used to query one or more objects, such as information about a job; then, the interaction module sends the query request to the service simulation module, so that the service simulation module uses the information stored in the data storage module to determine the query result corresponding to the query request; finally, the service simulation module sends the query result to the interaction module for display. The information stored in the data storage module is obtained by externally storing the information stored in the GCS deployed in the Ray cluster's master node. This ensures that the information stored in the data storage module includes the information stored in the GCS, and that the information stored in the data storage module is not affected by the master node's restart. Therefore, after the master node restarts, the information stored in the data storage module can be used for job investigation, effectively solving the problem of information loss caused by the GCS after the master node restarts. Furthermore, the service simulation module is used to simulate at least one service provided by GCS deployed within the Ray cluster, so that the services provided by the service simulation module are consistent with some services provided by GCS. This allows the service simulation module to better parse the information stored in the data storage module, resulting in better readability of the data ultimately displayed to the user. This effectively avoids the poor readability caused by directly displaying the information stored in the data storage module, thereby improving the information query experience.
[0123] Furthermore, in some scenarios, the GCS deployed within the Ray cluster may be updated, causing the information stored in the data storage module to include information obtained by externally storing information stored in different versions of GCS. This means that different information stored in the data storage module may require parsing and processing using different versions of GCS. Based on this, this application also provides a possible implementation of the information query method. In this implementation, when the information query system includes an interaction module, a service simulation module corresponding to multiple candidate version identifiers, and a data storage module, the information query method may include steps 21-24 below.
[0124] Step 21: The interaction module generates a query request based on the query operation triggered by the interaction module. The query request is used to request information about one or more objects. The query request carries a target version identifier, which is included in the multiple candidate version identifiers mentioned above.
[0125] Multiple candidate version identifiers are used to indicate which versions of GCS exist. Furthermore, for any given candidate version identifier, the corresponding service simulation module is used to simulate at least one service provided by a GCS with that candidate version identifier. Therefore, the service simulation module and the GCS corresponding to the same candidate version identifier can provide some of the same services.
[0126] The target version identifier is used to indicate which version of GCS is in when the information requested by the query request is stored externally, so that the service simulation module corresponding to the target version identifier can be used to parse and process the information later. This can effectively avoid defects caused by the inconsistency between the version used when storing the information and the version used when parsing the information, thereby improving the accuracy of the query results.
[0127] Furthermore, this application does not limit the method of obtaining the target version identifier mentioned above. For example, the target version identifier can be specified by the user. Or, the target version identifier can be automatically determined by the interaction module based on user-triggered operations, such as time selection operations.
[0128] Based on the relevant content of step 21 above, for the information query system, if the interaction module in the information query system detects a query operation triggered by the user, the interaction module first generates a query request based on the query operation, so that the query request can represent the query requirements described by the query operation, and the target version identifier carried by the query request can indicate which version of the service simulation module should be used to process the query request, so that the query request can be sent to the service simulation module corresponding to the target version identifier for processing.
[0129] Step 22: The interaction module sends the query request to the service simulation module corresponding to the target version identifier.
[0130] In this application, for the information query system, after the interaction module in the information query system obtains the query request, the interaction module first selects the service simulation module corresponding to the target version identifier from the service simulation modules corresponding to multiple candidate version identifiers in the information query system based on the target version identifier carried in the query request, and then the interaction module sends the query request to the service simulation module corresponding to the target version identifier for processing.
[0131] Step 23: The service simulation module corresponding to the target version identifier uses the information stored in the data storage module to determine the query result corresponding to the query request; the information stored in the data storage module is obtained by externally storing the information stored in GCS; the information stored in the data storage module includes information about one or more objects.
[0132] It should be noted that the content of step 23 is similar to the content of S2 above.
[0133] Step 24: The service simulation module corresponding to the target version identifier sends the query results to the interaction module so that the interaction module can display the query results.
[0134] It should be noted that the content of step 24 is similar to the content of S3 above.
[0135] Based on the relevant content of steps 21 to 24 above, it can be seen that in some scenarios, the information query system may include service simulation modules corresponding to multiple candidate version identifiers, so that the information query system can use the corresponding service simulation modules to parse and process the information stored by GCS through external storage under different versions. This can effectively avoid the defects caused by the differences between the services provided by GCS under different versions, thereby improving the accuracy of query results.
[0136] In addition, to better reduce resource pressure, the service simulation module corresponding to each candidate version identifier is only enabled when in use. Based on this, this application also provides a possible implementation of the information query method. In this method, when the information query system includes an interaction module, multiple service simulation modules corresponding to candidate version identifiers, and a data storage module, and the default state of the service simulation modules corresponding to each candidate version identifier is closed, the information query method may include steps 31-36 below.
[0137] Step 31: The interaction module generates a query request based on the query operation triggered by the interaction module. The query request is used to request information about one or more objects. The query request carries a target version identifier, which is included in the multiple candidate version identifiers mentioned above.
[0138] It should be noted that the relevant content of step 31 can be found in step 21 above.
[0139] Step 32: Start the service simulation module corresponding to the target version identifier.
[0140] In this application, for the information query system, after the interaction module in the information query system obtains the query request, the interaction module first selects the service simulation module corresponding to the target version identifier from the service simulation modules corresponding to multiple candidate version identifiers in the information query system based on the target version identifier carried in the query request, and then starts the service simulation module corresponding to the target version identifier.
[0141] Step 33: The interaction module sends the query request to the service simulation module corresponding to the target version identifier.
[0142] In this application, after it is determined that the service simulation module corresponding to the target version identifier has been started, the interaction module in the information query system can send the query request to the service simulation module corresponding to the target version identifier so that the service simulation module can process the query request.
[0143] Step 34: The service simulation module corresponding to the target version identifier uses the information stored in the data storage module to determine the query result corresponding to the query request; the information stored in the data storage module is obtained by externally storing the information stored in GCS; the information stored in the data storage module includes information about one or more objects.
[0144] It should be noted that the content of step 34 is similar to the content of S2 above.
[0145] Step 35: The service simulation module corresponding to the target version identifier sends the query results to the interaction module so that the interaction module can display the query results.
[0146] It should be noted that the content of step 35 is similar to the content of S3 above.
[0147] Step 36: Close the service simulation module corresponding to the target version identifier.
[0148] In this application, if the service simulation module corresponding to the target version identifier sends a query result, it can be determined that the service simulation module has been used up and is about to enter an idle state. Therefore, the service simulation module corresponding to the target version identifier can be shut down to reclaim the resources allocated to the service simulation module so that the resources can be reused to perform other processing in the future. This is beneficial to improving resource utilization and thus reducing resource pressure.
[0149] Based on the relevant content of steps 31 to 36 above, it can be seen that in some scenarios, the information query system may include service simulation modules corresponding to multiple candidate version identifiers, and the default state of each service simulation module corresponding to the candidate version identifier is closed. This allows the corresponding service simulation module to be turned on only when needed, and to be turned off only after the service simulation module has been used. This can effectively reduce resource consumption and thus effectively avoid defects caused by excessive resource consumption.
[0150] Based on the information query method provided in the embodiments of this application, the embodiments of this application also provide an information query system, which will be discussed below. Figure 10 Explanation and clarification will be provided. Among them, Figure 10 This is a schematic diagram of the structure of an information query system provided in an embodiment of this application. It should be noted that for technical details of the information query system provided in this embodiment, please refer to the relevant content of the information query method described above.
[0151] like Figure 10 As shown in the figure, the information query system 1000 provided in this application embodiment includes an interaction module 1001, a service simulation module 1002 and a data storage module 1003;
[0152] The interaction module 1001 is used to generate a query request based on the query operation triggered by the interaction module 1001, and the query request is used to request the query of information of one or more objects.
[0153] The service simulation module 1002 is used to receive a query request sent by the interaction module 1001; determine the query result corresponding to the query request using the information stored in the data storage module 1003; and send the query result to the interaction module 1001. The service simulation module 1002 is used to simulate at least one service provided by the Global Information Memory (GCS), which is deployed within the master node of the cluster. The information stored in the data storage module 1003 is obtained by externally storing the information stored in the GCS. The information stored in the data storage module 1003 includes information about one or more objects.
[0154] The interaction module 1001 is also used to display the query results.
[0155] In one possible implementation, the service simulation module 1002 is specifically used to: parse the query request and generate a query task, wherein the query task is to query information of one or more objects from the data storage module 1003; execute the query task to obtain information of one or more objects; and process the information of one or more objects to obtain query results corresponding to the query request.
[0156] In one possible implementation, the information query system 1000 includes a service simulation module 1002 corresponding to multiple candidate version identifiers;
[0157] The query request carries a target version identifier, and the plurality of candidate version identifiers include the target version identifier;
[0158] The method is applied to the service simulation module 1002 corresponding to the target version identifier.
[0159] In one possible implementation, the default state of the service simulation module 1002 corresponding to each candidate version identifier is the off state;
[0160] The service simulation module 1002 corresponding to the target version identifier is also used to start the service simulation module 1002 corresponding to the target version identifier; and to close the service simulation module 1002 corresponding to the target version identifier after sending the query result to the interaction module.
[0161] In one possible implementation, the information stored in the data storage module 1003 includes log information, which is obtained by externally storing some or all of the log files in the cluster.
[0162] And / or,
[0163] The information stored in the data storage module 1003 includes the state information of at least one object. For any object, the state information of the object is stored in the data storage module by overwriting the old state information with new state information, so that the state information of the object stored in the data storage module can be used to represent the latest state of the object.
[0164] In one possible implementation, the object is a cluster, job, service, stateful task, or stateless task.
[0165] Based on the aforementioned information query system 1000, it is understood that the information query system 1000, which is independent of the Ray cluster and provided in this application, includes an interaction module 1001, a service simulation module 1002, and a data storage module 1003. The working principle of the system 1000 is as follows: First, the interaction module 1001 generates a query request based on a query operation triggered by the interaction module 1001, so that the query request can be used to query information about one or more objects. Then, the interaction module 1001 sends the query request to the service simulation module 1002, so that the service simulation module 1002 uses the information stored in the data storage module 1003 to determine the query result corresponding to the query request. Finally, the service simulation module 1002 sends the query result to the interaction module 1001 for display. The information stored in the data storage module 1003 is obtained by externally storing information stored in the GCS deployed within the Ray cluster's master node. This ensures that the information stored in the data storage module 1003 includes the information stored in the GCS and is unaffected by master node restarts. This allows for job troubleshooting using the information stored in the data storage module 1003 after a master node restart, effectively resolving the problem of information loss in the GCS after a master node restart. Furthermore, the service simulation module 1002 simulates at least one service provided by the GCS deployed within the Ray cluster. This ensures that the services provided by the service simulation module 1002 are consistent with some services provided by the GCS, allowing the service simulation module 1002 to better parse the information stored in the data storage module 1003. This results in better readability of the data ultimately displayed to the user, effectively avoiding the poor readability caused by directly displaying information stored in the data storage module 1003, thus improving the information retrieval experience.
[0166] In addition, this application embodiment also provides an electronic device, the device including a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device performs any implementation of the information query method provided in this application embodiment.
[0167] See Figure 11The diagram illustrates a structural schematic of an electronic device 1100 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0168] like Figure 11 As shown, electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1102 or a program loaded from storage device 1108 into random access memory (RAM) 1103. RAM 1103 also stores various programs and data required for the operation of electronic device 1100. Processing device 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Input / output (I / O) interface 1105 is also connected to bus 1104.
[0169] Typically, the following devices can be connected to I / O interface 1105: input devices 1106 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 1107 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1108 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1109. Communication device 1109 allows electronic device 1100 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 An electronic device 1100 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0170] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1109, or installed from storage device 1108, or installed from ROM 1102. When the computer program is executed by processing device 1101, it performs the functions defined in the methods of embodiments of this disclosure.
[0171] The electronic device provided in this embodiment belongs to the same inventive concept as the method provided in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0172] This application also provides a computer-readable medium storing instructions or computer programs that, when executed on a device, cause the device to perform any implementation of the information query method provided in this application.
[0173] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0174] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0175] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0176] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, enable the electronic device to perform the aforementioned methods.
[0177] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0179] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units / modules do not necessarily limit the specific unit itself.
[0180] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0181] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0182] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0183] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0184] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0185] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0186] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information search method characterized by comprising: The method is applied to a service simulation module in an information query system, the service simulation module is configured to simulate at least one service provided by a global information storage (GCS), the at least one service includes a query request analysis service and a stored data analysis service, for any one of the services, the service simulation module provides the service consistent with the service provided by the GCS, the GCS is deployed in a master node of a cluster, and the information query system is independent of the cluster; The method comprises: receiving a query request sent by an interaction module in the information query system, the query request is generated according to a query operation triggered for the interaction module, and the query request is configured to request information of one or more objects; determining a query result corresponding to the query request by using information stored in a data storage module in the information query system, the information stored in the data storage module is obtained by externally storing information stored in the GCS, and the information stored in the data storage module includes information of the one or more objects; sending the query result to the interaction module, and the interaction module is configured to display the query result; the information query system includes a plurality of service simulation modules corresponding to candidate version identifiers, for any one of the candidate version identifiers, the service simulation module corresponding to the candidate version identifier is configured to simulate at least one service provided by a GCS having the candidate version identifier; the query request carries a target version identifier, information stored in the GCS having the target version identifier includes information of the one or more objects, and the plurality of candidate version identifiers includes the target version identifier; the method is applied to the service simulation module corresponding to the target version identifier; the method comprises: parsing the query request to generate a query task, the query task is configured to query information of the one or more objects from the data storage module; executing the query task to obtain a query result.
2. The method of claim 1, wherein, The determination process of the query result comprises: parsing the query request to generate a query task, the query task is configured to query information of the one or more objects from the data storage module; executing the query task to obtain the information of the one or more objects; processing the information of the one or more objects to obtain a query result corresponding to the query request.
3. The method of claim 1, wherein, The default state of each service simulation module corresponding to the candidate version identifier is a closed state; before the receiving of the query request sent by the interaction module in the information query system, the method further comprises: starting the service simulation module corresponding to the target version identifier; after the sending of the query result to the interaction module, the method further comprises: closing the service simulation module corresponding to the target version identifier.
4. The method of claim 1, wherein, The information stored in the data storage module includes log information, and the log information is obtained by externally storing part or all of log files in the cluster. and / or, The information stored in the data storage module includes state information of at least one object, and for any object, the state information of the object is stored in the data storage module by updating old state information with new state information, so that the state information of the object stored in the data storage module represents the latest state of the object.
5. The method according to any one of claims 1 to 4, characterized in that, The object is a cluster, a job, a service, a stateful task or a stateless task.
6. An information inquiry system characterized by comprising: The system includes an interaction module, a plurality of candidate version identifier corresponding service simulation modules and a data storage module, for any candidate version identifier, the candidate version identifier corresponding service simulation module is used to simulate at least one service provided by the GCS with the candidate version identifier, the at least one service includes a query request analysis service and a stored data analysis service, and for any service, the service provided by the candidate version identifier corresponding service simulation module is consistent with the service provided by the GCS with the candidate version identifier, and the GCS is deployed in a master node of a cluster; The interaction module is used to generate a query request according to a query operation triggered for the interaction module, and the query request is used to request information of one or more objects; The query request carries a target version identifier, information stored in the GCS with the target version identifier includes information of the one or more objects, and the plurality of candidate version identifiers includes the target version identifier; The target version identifier corresponding service simulation module is used to receive the query request sent by the interaction module; A query result corresponding to the query request is determined by using the information stored in the data storage module, and the query result is sent to the interaction module; The information stored in the data storage module is obtained by externally storing the information stored in the GCS, and the information stored in the data storage module includes the information of the one or more objects; The interaction module is also used to display the query result; The information query system is independent of the cluster; The target version identifier corresponding service simulation module is specifically used to analyze the query request, generate a query task, and query the information of the one or more objects from the data storage module by using the query task, and execute the query task to obtain a query result.
7. An electronic device, comprising: The device includes a processor and a memory; The memory is used to store instructions or computer programs; The processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes the method in any one of claims 1-5.
8. A computer readable medium characterized by The computer readable medium stores instructions or computer programs, and when the instructions or computer programs run on the device, the device executes the method in any one of claims 1-5.
9. A computer program product, characterised in that, It includes a computer program carried on a non-transitory computer readable medium, and the computer program includes program codes for executing the method in any one of claims 1-5.
Citation Information
Patent Citations
Multi-cluster data query method and device, monitoring platform and storage medium
CN114357001A