Method for adjusting data source in query engine and related device

By pre-configuring functional interfaces in the query engine to obtain edit requests and update data source configuration information, the problem of needing to restart the service when the query engine loads the data source is solved, improving service availability and ease of operation.

CN116521703BActive Publication Date: 2026-05-29BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2022-01-24
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, query engines need to restart the service when loading data sources, which restricts access for upper-layer applications and causes service unavailability.

Method used

Edit requests are obtained through pre-configured functional interfaces, and the data source configuration information of each execution node of the query engine is updated to avoid restarting the query engine service.

Benefits of technology

This allows for updating data source configurations without restarting the query engine, improving service availability and ease of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116521703B_ABST
    Figure CN116521703B_ABST
Patent Text Reader

Abstract

The application relates to a data source adjustment method in a query engine and related equipment, and applies to the technical field of data processing. The method comprises the following steps: obtaining an editing request for a target data source from a pre-configured function interface, the editing request carrying editing information, and the target data source comprising a data source in the query engine and / or a new data source; updating first data source configuration information loaded in each execution node of the query engine according to the editing information, wherein the first data source configuration information comprises configuration information of the target data source. The method can solve the problem that, in the prior art, a server needs to restart a query engine service to make an addition or modification of a configuration file effective, and the upper-layer application is limited during access due to the need to restart the query engine service, thereby causing the problem of unavailable service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and related equipment for adjusting data sources in a query engine. Background Technology

[0002] Presto is an OLAP (Online Analytical Processing) query engine that can perform interactive queries using SQL (Structured Query Language) against different data sources. The prerequisite for querying data is that the corresponding data source has been added to the Presto service as a catalog according to the configuration rules and is now active.

[0003] In related technologies, the technical solution for loading data sources by query engines is a cold loading. If a new data source needs to be added or an unused data source needs to be deleted, the user often needs to log in to the server to add or modify the configuration file. If deletion, update, or addition is performed, the query engine service needs to be restarted for the changes to take effect.

[0004] Because the query engine service needed to be restarted, access to the upper-layer application was restricted, resulting in service unavailability. Summary of the Invention

[0005] This application provides a method and related equipment for adjusting the data source in a query engine, which solves the problem in the prior art where adding or modifying configuration files on the server requires restarting the query engine service for the changes to take effect. This restarting of the query engine service restricts access for upper-layer applications, causing service unavailability.

[0006] In a first aspect, embodiments of this application provide a method for adjusting data sources in a query engine, including:

[0007] Obtain an edit request for the target data source from the pre-configured functional interface. The edit request carries editing information. The target data source includes data sources in the query engine and / or new data sources.

[0008] The first data source configuration information loaded in each execution node of the query engine is updated according to the edit information, and the first data source configuration information includes the configuration information of the target data source.

[0009] Optionally, after obtaining the editing request for the target data source from the pre-configured functional interface, the method further includes:

[0010] The second data source configuration information stored in the preset storage path of the query engine is updated according to the edit information. The second data source configuration information includes the configuration information of the target data source.

[0011] Optionally, before obtaining the edit request for the target data source from the pre-configured functional interface, the method further includes:

[0012] After the query engine is started, the configuration information of the second data source in the preset storage path of the query engine is loaded into each execution node of the query engine.

[0013] Optionally, the preset storage path points to the database of the query engine, and the second data source configuration information is stored in the configuration information table of the database; or the preset storage path points to each execution node of the query engine, and the second data source configuration information is stored in the configuration file of each execution node.

[0014] Optionally, the process of pre-configuring the functional interface includes:

[0015] Obtain the resource interface class of the data source, wherein the resource interface class of the data source includes the logic for editing the configuration information of the data source;

[0016] Add the resource interface class of the data source to the query engine.

[0017] Optionally, the edit request includes at least one of an add request, a delete request, a modify request, and a query request.

[0018] Optionally, before obtaining the edit request for the target data source from the pre-configured functional interface, the method further includes:

[0019] Obtain the target object's access request to the functional interface, wherein the access request carries the identity identifier of the target object;

[0020] The target object is determined to have editing permissions based on the identity identifier.

[0021] Secondly, embodiments of this application provide an adjustment device for data sources in a query engine, comprising:

[0022] The acquisition module is used to acquire an editing request for a target data source from a pre-configured functional interface. The editing request carries editing information, and the target data source includes data sources in the query engine and / or new data sources.

[0023] The update module is used to update the configuration information of the first data source loaded in each execution node of the query engine according to the edit information. The configuration information of the first data source includes the configuration information of the target data source.

[0024] Thirdly, embodiments of this application provide an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0025] The memory is used to store computer programs;

[0026] The processor is used to execute the program stored in the memory to implement the method for adjusting the data source in the query engine described in this aspect.

[0027] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for adjusting the data source in the query engine described in this aspect.

[0028] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains an editing request for a target data source from a pre-configured functional interface. The editing request carries editing information, and the target data source includes data sources in the query engine and / or new data sources. The method updates the configuration information of the first data source loaded in each execution node of the query engine according to the editing information. The configuration information of the first data source includes the configuration information of the target data source. Thus, when editing of the target data source is required, the target object can issue an editing request through the pre-configured functional interface. After obtaining the target object's editing request for the target data source through the pre-configured functional interface, the first data source configuration information loaded in each execution node of the query engine can be updated according to the editing information carried in the editing request. This update of the target data source configuration information in the execution nodes can be achieved without restarting the query engine, avoiding service unavailability. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0030] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 An application scenario diagram illustrating the method for adjusting the data source in a query engine provided in an embodiment of this application;

[0032] Figure 2A flowchart illustrating a method for adjusting the data source in a query engine according to an embodiment of this application;

[0033] Figure 3 A flowchart illustrating a method for adjusting the data source in a query engine, as provided in another embodiment of this application;

[0034] Figure 4 A flowchart illustrating the method for adjusting data sources in existing query engines;

[0035] Figure 5 A structural diagram of a data source adjustment device in a query engine provided in an embodiment of this application;

[0036] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0038] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be subject to the following interpretations.

[0039] Presto: Presto is an open-source OLAP query engine based on an MPP architecture from Facebook. It's a distributed SQL execution engine capable of executing large datasets from various data sources. Suitable for interactive analytical queries, it supports data volumes from GB to PB. Presto provides its own cluster monitoring and can perform scheduling based on monitoring information. Presto has rich plugin interfaces, perfectly integrating with external storage systems or allowing the addition of custom functions.

[0040] Presto data model: It adopts the following three-layer structure: 1. catalog: corresponds to a certain type of data source, such as Hive data or MySQL data; 2. schema: corresponds to the database in MySQL; 3. table: corresponds to the table in MySQL.

[0041] Coordinator Node: In Presto, the Coordinator node (also known as the regulating node) is responsible for parsing SQL statements, generating and optimizing physical execution plans, and managing the Worker nodes (also known as execution nodes) in Presto. It is the "brain" of Presto. It is also the node where clients submit SQL statements. Each running Presto cluster contains one Coordinator node and one or more Worker nodes.

[0042] Worker Nodes: Worker nodes are responsible for executing tasks and processing data according to those tasks.

[0043] Presto Cluster: Presto is a distributed system running on multiple servers. A complete installation includes one Coordinator node and multiple Worker nodes. Queries are submitted by clients through the Presto Command-line Interface (CLI) to the Coordinator node. The Coordinator node parses, analyzes, and executes the query plan, then distributes the processing queue to the Worker nodes.

[0044] Hot reloading: Hot reloading allows modified information to be loaded without restarting the server.

[0045] According to an embodiment of this application, a method for adjusting the data source in a query engine is provided. Optionally, in this embodiment, the above-described method for adjusting the data source in a query engine can be applied to, for example... Figure 1 The hardware environment shown consists of terminal 101 and server 102. For example... Figure 1 As shown, server 102 is connected to terminal 101 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 102. The network mentioned above includes, but is not limited to, wide area network, metropolitan area network or local area network. Terminal 101 is not limited to PC, mobile phone, tablet computer, etc.

[0046] The data source adjustment method in the query engine of this application embodiment can be executed by server 102, terminal 101, or jointly by server 102 and terminal 101. Specifically, the data source adjustment method in the query engine of this application embodiment can be executed by terminal 101, or by a client installed on it.

[0047] Taking the method for adjusting the data source in the query engine of this application embodiment as an example, the query engine (Presto) consists of a Coordinator node and multiple Worker nodes. The Coordinator node and the Worker nodes can be deployed on one or more servers. After the client submits a relevant request, it is submitted to the Coordinator node from the Presto command line (CLI). The Coordinator node parses the request, analyzes it, generates an execution plan, and distributes the processing queue to the Worker nodes, which then execute the execution plan.

[0048] Figure 2 This is a flowchart illustrating an optional method for adjusting the data source in a query engine according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0049] Step 201: Obtain an edit request for the target data source from the pre-configured functional interface. The edit request carries edit information. The target data source includes data sources in the query engine and / or new data sources.

[0050] In some embodiments, when the target object needs to make corresponding edits to the target data source, it can make corresponding settings at the pre-configured functional interface (such as selecting the editing method and editing content). After the settings are completed, the server can obtain the target object's editing request for the target data source from the pre-configured functional interface.

[0051] The edit request for the target object can be an edit request for one data source or multiple data sources. Accordingly, there can be various types of edit requests, including but not limited to at least one of the following: add request, delete request, modify request, and query request for the target data source.

[0052] The edit request carries edit information, enabling the server to perform corresponding edits based on that information. For example, edit information might include adding a new catalog, deleting an unused catalog, modifying the configuration information of a currently used catalog, and / or viewing the configuration information of a catalog currently in use in Presto.

[0053] It is understandable that the target objects mentioned above could be the upper-level applications of the Presto or the administrators of the Presto.

[0054] In one optional embodiment, before obtaining the edit request for the target data source from a pre-configured functional interface, the method further includes:

[0055] After the query engine is started, the configuration information of the second data source in the query engine's preset storage path is loaded into each execution node of the query engine.

[0056] In some embodiments, after Presto starts, the Coordinator node and Worker node start. Each node loads the second catalog configuration information according to the second data source configuration information in the Presto preset storage path to make it effective, so that the second catalog configuration information is loaded on each execution node.

[0057] Optionally, the preset storage path can be set according to the actual situation. For example, the preset storage path can point to the database of the query engine, or the preset storage path can point to each execution node of the query engine.

[0058] In some embodiments, the preset storage path can point to each execution node in Presto. Each execution node has a configuration file directory. For each catalog, a corresponding catalog configuration file is created in this directory. The configuration file contains the catalog's configuration information, such as the MySQL connection address, port number, username, and password. The configuration files are identical across all execution nodes. If the catalog configuration file on one execution node changes, administrators need to manually modify it on other execution nodes or synchronize the changes from that execution node to other execution nodes.

[0059] In other embodiments, the preset storage path may also point to a database added in Presto, where a configuration information table is created. Configuration information for each catalog is compiled in this table. When each execution node loads catalog configuration information, it is loaded from this table, ensuring the consistency of catalog configuration information loaded by each node. Furthermore, if the configuration information of a catalog on a certain node changes, no synchronization or manual synchronization is required, improving the efficiency of updating catalog configuration information.

[0060] The specific contents of the configuration information table can be found in Table 1 below.

[0061] field name Field Description Field type id primary key bigint catalog_name Catalog name (unique) string connector_name Connection name string properties Connection configuration information json create_time Creation time datetime update_time Update time datetime

[0062] Table 1

[0063] It is understood that the field names, field descriptions, and field types in Table 1, as well as the corresponding content under their cells, are only examples and do not imply that the configuration information table in this application is limited to Table 1 above.

[0064] In an optional embodiment, the process of the pre-configured functional interface described above may specifically include:

[0065] Obtain the resource interface class of the data source, which includes the logic for editing the data source configuration information; add the resource interface class of the data source to the query engine.

[0066] In some embodiments, the resource interface (CatalogResourceApi) class of the data source encapsulates the logic for editing the data source configuration information. By adding the CatalogResourceApi class to Presto, Presto gains an external API (Application Programming Interface). Through this API, target objects can edit (add, delete, modify, and query, etc.) the catalog configuration information by accessing the interface.

[0067] In an optional embodiment, to prevent arbitrary editing of the catalog configuration information in Presto, this application sets editing permissions for the target object.

[0068] Specifically, before obtaining the edit request for the target data source from the pre-configured functional interface, the process also includes:

[0069] Obtain the target object's access request to the functional interface, with the access request carrying the target object's identity identifier; determine whether the target object has editing permissions based on the identity identifier.

[0070] In some embodiments, when a target object needs to delete, modify, add, or query catalog configuration information in Presto, it can access it through the API provided by Presto. After receiving the access request, the Presto server will verify the identity identifier of the target object carried in the access request and compare the identity identifier with the identity identifier set stored in Presto. If the identity identifier exists in the identity identifier set, it is determined that the target object has editing permissions; if the identity identifier does not exist in the identity identifier set, it is determined that the target object does not have editing permissions, and no subsequent steps are executed.

[0071] Step 202: Update the configuration information of the first data source loaded in each execution node of the query engine according to the editing information. The configuration information of the first data source includes the configuration information of the target data source.

[0072] In some embodiments, after receiving an edit request, since the edit request carries edit information, updating the first data source configuration information loaded in each execution node of Presto with the edit information can achieve the update of the target data source configuration information in the execution node without restarting the query engine, thus avoiding service unavailability.

[0073] In an optional embodiment, after receiving an edit request, the configuration information of the second data source stored in the preset storage path of the query engine can also be updated according to the edit information.

[0074] By updating the configuration information of the second catalog stored in Presto's default storage path, the Presto service can be loaded according to the edited configuration information when it restarts, which can avoid the target object from making repeated requests for the edited information and reduce the operations of the target object.

[0075] It is understandable that the configuration information of the first catalog and the configuration information of the second catalog can be updated simultaneously or in a specific order, such as updating the configuration information of the first catalog first or the configuration information of the second catalog first.

[0076] It is understandable that after all execution nodes and target addresses in Presto have updated their catalog configuration information, the first catalog configuration information will be the same as the second catalog configuration information.

[0077] In one specific embodiment, before startup, the catalog configuration information is stored in the configuration files of each Presto node. When the service starts, the catalog configuration information is loaded from the configuration files by each node in the cluster. A `CatalogResourceApi` class is added to the Presto service to provide an API. Upper-layer applications or cluster administrators can access the API to perform CRUD operations on the catalog configuration information. When adding, deleting, or modifying catalog configuration information, the data in the configuration information table in the database is updated, and the catalog configuration information loaded in the memory of each node in the cluster is also updated simultaneously, achieving real-time dynamic hot reloading.

[0078] In this embodiment, the problem of requiring a service restart to load the catalog is solved. The data source adjustment method in the query engine of this application is adopted to optimize the way catalog configuration information is loaded when the service starts. Functional interfaces are added to facilitate the addition, deletion, modification and query of catalog configuration information. The catalog loading logic is optimized to achieve dynamic hot loading.

[0079] In another specific embodiment, see Figure 3 In the Presto management interface or terminal, after a user triggers the Presto service, the Presto service starts. The Presto execution node includes multiple functional modules (i.e. Figure 3The system comprises a Presto server, a main server module, a static catalog store, and a connection manager. The Presto server communicates with the main server module. The Presto server sends a start signal to the main server module to initialize the static catalog store, load the configuration class and pre-configured functional interfaces (such as the CatalogResourceApi). The Presto server then sends a load signal to the static catalog store to load catalog information. The static catalog store loads catalog configuration information from the database's configuration information table and sends a create catalog signal to the connection manager, which then creates the catalog. Furthermore, after logging in, the target object can add, delete, and modify catalog settings through the external API, updating the catalog configuration information in the database and the connection manager via the CatalogResourceApi.

[0080] Thus, before the Presto service starts, the catalog configuration information is stored in the configuration information table of the database for easy operation. The catalog configuration information is loaded during service startup as follows: when the service starts, each node in the cluster loads the catalog configuration information from the configuration information table in the database. A `CatalogResourceApi` class is added to the Presto service to provide an API, allowing upper-layer applications or cluster administrators to access and perform CRUD operations on the catalog configuration information. When adding, deleting, or modifying catalog configuration information, the data in the configuration information table in the database is updated, and simultaneously, the catalog configuration information loaded in the memory of each node in the cluster is updated uniformly, achieving real-time dynamic hot reloading.

[0081] In this embodiment, compared to the prior art, after a user triggers the Presto service on the Presto management interface or terminal, the Presto service starts, and the Presto execution node includes multiple functional modules (i.e. Figure 4The system comprises a Presto server, a main server module, a static catalog store, and a connection manager. The Presto server communicates with the main server module. The Presto server sends a start signal to the main server module to initialize the static catalog store and load the configuration class. The Presto server then sends a load signal to the static catalog store to load catalog information from configuration files in the catalog directory. Finally, it sends a create catalog signal to the connection manager, which then creates the catalog. Furthermore, in existing technology, when performing CRUD operations on catalog configuration information, the target object needs to modify the catalog configuration information in the configuration file. Since only the configuration information in the configuration file is modified, while the configuration information in the connection manager is not, Presto needs to be restarted to reload the configuration information in the connection manager before CRUD operations can be performed.

[0082] Therefore, compared with the prior art, this application can solve the problems of inconvenience in adding, deleting, modifying and querying catalog configuration files, and the need to restart the service to load the catalog. It adopts the data source adjustment method in the query engine of this application to optimize the storage method of catalog configuration information, making it easier to operate; optimizes the way catalog configuration information is loaded when the service starts; adds functional interfaces to facilitate adding, deleting, modifying and querying catalog configuration information; and optimizes the catalog loading logic to achieve dynamic hot loading.

[0083] The method for adjusting the data source in the query engine of this application optimizes the storage method of catalog configuration information. By uniformly storing catalog configuration information in a database table, operations on configuration information become simpler and more convenient. Using a relational database configuration information table facilitates CRUD operations. Optimizing the way catalog configuration information is loaded at service startup, and uniformly loading configuration information from the same table, ensures consistency, improves accuracy, and makes loading more efficient. Adding functional interfaces facilitates CRUD operations on catalog configuration information. The Presto service adds a CatalogResourceApi class, providing an API for upper-layer applications or cluster administrators to access and perform CRUD operations on catalog configuration information, simplifying daily catalog operations. A unified interface and standard make the process simpler and more efficient. Optimizing the catalog loading logic enables dynamic hot reloading, allowing catalog configurations to take effect without restarting the Presto service. This brings a qualitative change to Presto cluster maintenance, improves service availability, and provides a better user experience for upper-layer applications.

[0084] Based on the same concept, this application provides a device for adjusting the data source in a query engine. The specific implementation of this device can be found in the description of the method embodiments section; repeated details will not be repeated here. Figure 5 As shown, the device mainly includes:

[0085] The acquisition module 501 is used to acquire an editing request for a target data source from a pre-configured functional interface. The editing request carries editing information, and the target data source includes data sources in the query engine and / or new data sources.

[0086] The update module 502 is used to update the configuration information of the first data source loaded in each execution node of the query engine according to the editing information. The configuration information of the first data source includes the configuration information of the target data source.

[0087] Based on the same concept, this application also provides an electronic device, such as... Figure 6 As shown, the electronic device mainly includes a processor 601, a memory 602, and a communication bus 603. The processor 601 and the memory 602 communicate with each other via the communication bus 603. The memory 602 stores programs that can be executed by the processor 601. The processor 601 executes the programs stored in the memory 602 to achieve the following steps:

[0088] Obtain an edit request for the target data source from the pre-configured functional interface. The edit request carries editing information. The target data source includes data sources in the query engine and / or new data sources.

[0089] The first data source configuration information loaded in each execution node of the query engine is updated based on the edit information. The first data source configuration information includes the configuration information of the target data source.

[0090] The communication bus 603 mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 603 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0091] The memory 602 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor 601.

[0092] The processor 601 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., or a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0093] In another embodiment of this application, a computer-readable storage medium is provided, which stores a computer program that, when run on a computer, causes the computer to perform the method for adjusting the data source in the query engine described in the above embodiments.

[0094] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape, etc.), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.

[0095] It should be noted that, in this document, relational terms such as “first” and “second” are used merely 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.

[0096] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. 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 the invention. Therefore, the present invention 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 claimed herein.

Claims

1. A method for adjusting the data source in a query engine, characterized in that, include: The configuration information table in the relational database stores the configuration information of the second data source for the query engine; After the query engine is determined to be started, the second data source configuration information of the query engine in the configuration information table is loaded into each execution node of the query engine; Obtain an edit request for the target data source from the pre-configured functional interface. The edit request carries editing information. The target data source includes data sources in the query engine and / or new data sources. The first data source configuration information loaded in each execution node of the query engine is updated according to the edit information, and the first data source configuration information includes the configuration information of the target data source; The query engine updates the second data source configuration information stored in the configuration information table according to the edit information, and the second data source configuration information includes the configuration information of the target data source.

2. The method for adjusting the data source in the query engine according to claim 1, characterized in that, The process of pre-configuring the functional interface includes: Obtain the resource interface class of the data source, wherein the resource interface class of the data source includes the logic for editing the configuration information of the data source; Add the resource interface class of the data source to the query engine.

3. The method for adjusting the data source in the query engine according to claim 1, characterized in that, The edit request includes at least one of the following: add request, delete request, modify request, and query request.

4. The method for adjusting the data source in the query engine according to claim 1, characterized in that, Before obtaining the editing request for the target data source from the pre-configured functional interface, the process also includes: Obtain the target object's access request to the functional interface, wherein the access request carries the identity identifier of the target object; The target object is determined to have editing permissions based on the identity identifier.

5. A device for adjusting data sources in a query engine, characterized in that, include: The configuration information table in the relational database stores the configuration information of the second data source for the query engine; After the query engine is determined to be started, the second data source configuration information of the query engine in the configuration information table is loaded into each execution node of the query engine; The device further includes: The acquisition module is used to acquire an editing request for a target data source from a pre-configured functional interface. The editing request carries editing information, and the target data source is any data source in the query engine or a new data source. The update module is used to update the configuration information of the first data source loaded in each execution node of the query engine according to the edit information, wherein the configuration information of the first data source includes the configuration information of the target data source; and to update the configuration information of the second data source stored in the configuration information table by the query engine according to the edit information, wherein the configuration information of the second data source includes the configuration information of the target data source.

6. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory is used to store computer programs; The processor is configured to execute the program stored in the memory to implement the method for adjusting the data source in the query engine according to any one of claims 1-4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method for adjusting the data source in the query engine according to any one of claims 1-4.