A Hive secondary full-text indexing technology method and system based on Elasticsearch
By introducing Elasticsearch's secondary full-text indexing technology into Hive, the problem of data consistency and full-text index coverage is solved, the Hive index expansion and full-text indexing requirements are met, and the system's reliability and resource utilization efficiency are improved.
Patent Information
- Application Number
- CN202010616559.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-01
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-07-01
AI Technical Summary
The existing technology is difficult to maintain data consistency when indexing a large amount of data, and the basic coverage requirements for full-text retrieval are narrow and cannot meet the expansion needs of full-text indexing.
Adopt the Hive secondary full-text index technology method based on Elasticsearch, create a full-text index table through CREATE FULL INDEX, and synchronize the INSERT, UPDATE, and DELETE operations of the original table to the full-text index table in ES, use the full-text index conditions to query the original table, and Drop indexes and original tables with data consistency guarantees.
It expands the usage scenarios of Hive indexes, solves the coverage of full-text index requirements, avoids full table scans and resource waste, ensures data consistency, and improves overall reliability in high-availability systems.
Smart Images

Figure CN111753045B
Abstract
Description
Technical Field
[0001] The invention discloses a Hive secondary full-text indexing technical method and system based on Elasticsearch, and relates to the technical field of data full-text indexing. Background Art
[0002] Hive on Elasticsearch (Elasticsearch is abbreviated as ES) plug-in is developed by Elastic and implements the Hive external storage handler mechanism. After loading this plug-in, Hive's storage data source is not only HDFS, but also external storage engines such as Elasticsearch.
[0003] Hive can be used to indirectly perform add, delete, query and modify operations on the Elasticsearch engine:
[0004] 1) CREATE and DROP TABLE statements can be used to create and delete tables of the Elasticsearch engine;
[0005] 2) Use INSERT, UPDATE, DELETE, and SELECT statements to perform corresponding operations on the Elasticsearch engine table;
[0006] The existing full-text search infrastructure covers a relatively narrow range of demand scenarios, and it is difficult to maintain data consistency when indexing large amounts of data. Therefore, a Hive secondary full-text indexing technology method and system based on Elasticsearch is invented to solve the above problems. Summary of the invention
[0007] In view of the problems of the prior art, the present invention provides a Hive secondary full-text indexing method and system based on Elasticsearch, and the technical solution adopted is:
[0008] A Hive secondary full-text indexing technology method based on Elasticsearch, wherein the method comprises the following specific steps:
[0009] S1 creates a full-text index table for the Hive original data table using CREATE FULL INDEX.
[0010] S2 synchronizes INSERT, UPDATE, and DELETE operations on the original table with the full-text index table in ES;
[0011] S3 uses the full-text index condition to query the original table;
[0012] S4 deletes the full-text index;
[0013] S5 deletes the original table.
[0014] The specific steps of S1 creating a full-text index table for the Hive original data table through CREATE FULL INDEX include:
[0015] S101 added DDL keyword FULL;
[0016] S102 performs statement scanning, lexical analysis, and syntax checking on CREATE FULL INDEX
[0017] After S103 passes the check, a corresponding index table is created in the ES engine according to the DDL metadata information.
[0018] The specific steps of S2 synchronizing the original table INSERT, UPDATE, and DELETE with the full-text index table in ES include:
[0019] S201 records the transaction log of this operation;
[0020] S202 INSERT, UPDATE, and DELETE are performed on the original table. If successful, they are executed downwards. If failed, they return to S201.
[0021] S203 INSERT, UPDATE, and DELETE are performed on the index table. If the execution succeeds, the transaction is committed. If the execution fails, the transaction is rolled back according to the transaction log.
[0022] The specific steps of using S3 full-text index conditions to query the original table include:
[0023] S301 parses the Hive driver syntax into an abstract syntax tree;
[0024] S302 obtains a syntax tree query expression clause and parses a restful query part;
[0025] S303 creates a restful query statement through DSLBuilder and pushes it down to the Elasticsearch engine;
[0026] S304 uses the Hive driver to query the result set returned by the ES engine as the RowKey set of the original table;
[0027] S305 uses Hive driver to map the result set into a relational table and returns it to the user.
[0028] The specific steps of deleting the full-text index in S4 include:
[0029] S401 deletes INDEX metadata in Hive;
[0030] S402 deletes the corresponding index table in the ES engine.
[0031] The specific steps of deleting the original table in S5 include:
[0032] S501 If the INDEX related to the original table exists, delete the INDEX and then delete the original table;
[0033] S502 If the INDEX associated with the original table does not exist, directly delete the original table.
[0034] A Hive secondary full-text indexing technology system based on Elasticsearch, the system includes a creation module, an operation module, a query module, a deletion module and a processing module:
[0035] Creation module: Create a full-text index table for the Hive original data table through CREATE FULL INDEX;
[0036] Operation module: Synchronize the INSERT, UPDATE, and DELETE operations of the original table with the full-text index table in ES;
[0037] Query module: use full-text index conditions to query the original table;
[0038] Delete module: delete full-text index;
[0039] Processing module: Delete the original table.
[0040] The creation module specifically includes an editing module, a checking module and a building module:
[0041] Edit module: Add DDL keyword FULL;
[0042] Check module: CREATE FULL INDEX performs statement scanning, lexical analysis, and syntax checking
[0043] Establish module: After the check passes, create the corresponding index table in the ES engine according to the DDL metadata information.
[0044] The operation module specifically includes a recording module, an original table operation module and an index table operation module:
[0045] Recording module: records the transaction log of this operation;
[0046] Original table operation module: INSERT, UPDATE, and DELETE are operated on the original table. If successful, they are executed downwards. If failed, they are returned to the record module.
[0047] Index table operation module: INSERT, UPDATE, and DELETE are performed on the index table. If the execution is successful, the transaction is committed. If the execution fails, the transaction is rolled back according to the transaction log.
[0048] The query module specifically includes a first parsing module, a second parsing module, a restful creation module, a return result query module and a result mapping module:
[0049] The first parsing module: parses the Hive driver syntax into an abstract syntax tree;
[0050] The second parsing module: the method tree query expression clause, the parsing restful query part;
[0051] RESTful creation module: creates RESTful query statements through DSLBuilder and pushes them down to the Elasticsearch engine;
[0052] Return result query module: Use Hive driver to query the result set returned by the ES engine as the RowKey set of the original table;
[0053] Result mapping module: Uses Hive driver to map the result set into a relational table and returns it to the user.
[0054] The deletion module includes a metadata clearing module and an index table clearing module:
[0055] Metadata clearing module: deletes INDEX metadata in Hive;
[0056] Index table clearing module: deletes the corresponding index table in the ES engine.
[0057] The beneficial effects of the present invention are as follows: The purpose of the invention of this method is to propose a Hive secondary full-text indexing technology method and system based on Elasticsearch, which is to expand the index type of Hive. It adds full-text indexing function, expands the usage scenarios of Hive index, and solves the coverage of full-text indexing demand scenarios; Hive index is actually an index table (Hive physical table), when Hive executes a query through the index column, firstly, an MR / Spark / Tez engine task is used to query the index table, and according to the filtering conditions of the index column, the result set corresponding to the index column value is queried, and then the original file is filtered according to the result set as the input of the query task, which can avoid full table scanning and resource waste;
[0058] The method of the present invention is applied to scenarios with strong full-text indexing requirements, such as log storage systems, personal information fusion systems, etc.; based on transaction log technology, it ensures strong data consistency between the original table and the index table, making it more reliable. At the same time, Hive and ES are both high-availability systems, making them highly available as a whole; at the same time, this technical method also deeply integrates the Hadoop ecosystem and the Elastic software stack. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0060] Figure 1 is a flow chart of the method of the present invention; Figure 2 It is a structural schematic diagram of the system of the present invention; Figure 3 It is the operation sequence diagram of INSERT, UPDATE, and DELETE; Figure 4 It is a query process sequence diagram. DETAILED DESCRIPTION
[0061] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0062] The invention of this method aims to propose a Hive secondary full-text indexing technology method and system based on Elasticsearch, which is to expand the index type of Hive. It adds full-text indexing function, expands the usage scenarios of Hive index, and solves the coverage of full-text indexing demand scenarios.
[0063] First, let’s explain some of the nouns involved:
[0064] Hive: It is a data warehouse tool based on Hadoop, used for data extraction, transformation, and loading. The Hive data warehouse tool can map structured data files into a database table, and provides SQL query functions, which can convert SQL statements into MR / Spark / Tez computing engine tasks for execution. The advantage of Hive is that it has a low learning cost and can achieve fast data analysis through SQL-like statements.
[0065] Hive UDF: It is the abbreviation of User defined Function, which is a user-defined method. Through this processing mechanism, users can process related table data by themselves.
[0066] ElasticSearch: Developed by Elastic, it provides a distributed multi-user full-text search engine. Based on the RESTful web interface, it is a search server based on Lucene.
[0067] Secondary index: An index is created based on the original data column, and a secondary index is created again based on the index data. In use, you can first find the index data through the secondary index, and then find the original data based on the index data.
[0068] Full-text indexing: Full-text indexing technology is a key technology for search engines, and is usually implemented using inverted indexing. Data is stored in the following ways. EX:
[0069] ElasticSearch Server (Document 1)
[0070] Mastering ElasticSearch (Document 2)
[0071] Apache Solr 4 Cookbook (Document 3)
[0072]
[0073] Embodiment 1:
[0074] A Hive secondary full-text indexing technology method based on Elasticsearch, wherein the method comprises the following specific steps:
[0075] S1 creates a full-text index table for the Hive original data table using CREATE FULL INDEX.
[0076] S2 synchronizes INSERT, UPDATE, and DELETE operations on the original table with the full-text index table in ES;
[0077] S3 uses the full-text index condition to query the original table;
[0078] S4 deletes the full-text index;
[0079] S5 deletes the original table;
[0080] When performing secondary full-text index processing on Hive based on Elasticsearch by the method of the present invention, firstly, a full-text index table is created for the Hive original data table through CREATE FULL INDEX according to S1, and then the original table INSERT, UPDATE, and DELETE are synchronized with the full-text index table in ES according to S2. When operating data in the index table, corresponding restful interface statements are generated and sent to the ES engine. Then, the original table is queried using the full-text index condition through S3, and a query test case is shown:
[0081] SELECT / *t_employee index_test* / *FROM t_employee WHERE MATCH('{"match":{"address","tianjin"}}');
[0082] When using full-text index conditions for querying, the index conditions will first be pushed to the ES engine. The parameters of the MATCH function (custom Hive UDF function) are the actual query statements. In this example, it means to find the data rows containing tianjin in addree. The result set of the query in ES will be transmitted to Hive through the network. Hive will search in the original table t_employee according to the id column and return the final result set to the user;
[0083] Delete the full-text index according to S4, and finally delete the original table according to S5;
[0084] This two-level full-text indexing solution can achieve the effect described in the invention purpose, and can be applied to scenarios with strong full-text indexing requirements, such as log storage systems, personal information fusion systems, etc.; based on transaction log technology, it ensures strong data consistency between the original table and the index table, making it more reliable. At the same time, Hive and ES are both high-availability systems, making them highly available as a whole; at the same time, this technical method also deeply integrates the Hadoop ecosystem and the Elastic software stack, which is a major breakthrough;
[0085] Furthermore, the specific steps of S1 creating a full-text index table for the Hive original data table through CREATE FULL INDEX include:
[0086] S101 added DDL keyword FULL;
[0087] S102 performs statement scanning, lexical analysis, and syntax checking on CREATE FULL INDEX
[0088] After S103 passes the check, a corresponding index table is created in the ES engine according to the DDL metadata information;
[0089] Hive Index DDL extension: Add the keyword FULL to make it effective in DDL statement scanning, lexical analysis, and syntax checking.
[0090] Hive natively supports the CREATE INDEX syntax. On this basis, we add the CREATE FULL INDEX syntax. The test case is as follows:
[0091] --Create the original table t_employee ddress VARCHAR(100) in Hive;
[0092] --Create a full-text index index_test based on the address column of the original table t_employee
[0093] CREATE FULL INDEX index_test ON t_employee(address);
[0094] At this time, the index table index_test will be created in the ES engine. The two-dimensional relationship between the original table and the index table is as follows: t_employee original table:
[0095]
[0096] index_test index table:
[0097]
[0098] This method expands the INDEX syntax and introduces the keyword FULL. When creating a full-text index, a full-text index table is created in the ES engine. When performing INSERT, UPDATE, and DELETE operations on the Hive original table, the same operations are performed on the ES engine table to ensure data consistency.
[0099] Furthermore, the specific steps of S2 synchronizing the original table INSERT, UPDATE, and DELETE operations with the full-text index table in ES include:
[0100] S201 records the transaction log of this operation;
[0101] S202 INSERT, UPDATE, and DELETE are performed on the original table. If successful, they are executed downwards. If failed, they return to S201.
[0102] S203 INSERT, UPDATE, and DELETE are performed on the index table. If successful, the transaction is committed. If failed, the transaction is rolled back according to the transaction log.
[0103] When the original table performs INSERT, UPDATE, or DELETE operations, the index table will also perform corresponding operations;
[0104] When operating data in the index table, the corresponding restful interface statements will be generated and sent to the ES engine, such as Figure 3 As shown;
[0105] At the same time, the atomicity of the operations of the two tables is guaranteed through the transaction log, thereby ensuring the consistency of the data on both ends. At the same time, the successful submission or rollback of the transaction will be further determined based on the execution results of the ES engine;
[0106] Furthermore, the specific steps of using the full-text index condition to query the original table in S3 include:
[0107] S301 parses the Hive driver syntax into an abstract syntax tree;
[0108] S302 obtains a syntax tree query expression clause and parses a restful query part;
[0109] S303 creates a restful query statement through DSLBuilder and pushes it down to the Elasticsearch engine;
[0110] S304 uses the Hive driver to query the result set returned by the ES engine as the RowKey set of the original table;
[0111] S305 uses Hive driver to map the result set into a relational table and returns it to the user;
[0112] Timing diagram Figure 4 As shown;
[0113] Abstract syntax tree parsing: Get the query condition part MATCH('{"match":{"address","tianjin"}}') in the abstract syntax tree. The query expression is a tree syntax structure. The content of the MATCH function and function parameters can be obtained by expression parsing;
[0114] The domain-specific language Builder module creates complete statements (including DDL, DML, and query statements) executed by the ES engine. It is responsible for constructing complete query statements for the ES engine based on the expressions obtained from the abstract syntax tree; constructing statements for creating the ES engine full-text index based on the metadata information of CREATEFULL INDEX; and constructing statements for deleting the ES engine index based on DROP INDEX.
[0115] Furthermore, the specific steps of deleting the full-text index in S4 include:
[0116] S401 deletes INDEX metadata in Hive;
[0117] S402 deletes the corresponding index table in the ES engine.
[0118] When deleting the original table, an additional step is required, that is, if there is an index table associated with the original table, the index table is deleted first. This process is also atomic.
[0119] Furthermore, the specific steps of deleting the original table in S5 include:
[0120] S501 If the INDEX related to the original table exists, delete the INDEX and then delete the original table;
[0121] S502 If the INDEX associated with the original table does not exist, directly delete the original table.
[0122] Embodiment 2:
[0123] A Hive secondary full-text indexing technology system based on Elasticsearch, the system includes a creation module, an operation module, a query module, a deletion module and a processing module:
[0124] Creation module: S1 creates a full-text index table for the Hive original data table through CREATE FULL INDEX;
[0125] Operation module: S2 synchronizes INSERT, UPDATE, and DELETE operations on the original table with the full-text index table in ES;
[0126] Query module: S3 uses full-text index conditions to query the original table;
[0127] Deletion module: S4 deletes the full-text index;
[0128] Processing module: S5 deletes the original table;
[0129] When performing secondary full-text index processing on Hive based on Elasticsearch by the method of the present invention, firstly, a full-text index table is created for the Hive original data table by using the creation module through CREATE FULL INDEX, and then the original table INSERT, UPDATE, and DELETE are synchronized with the full-text index table in ES by the operation module. When operating data in the index table, corresponding restful interface statements are generated and sent to the ES engine. Then, the original table is queried using the full-text index condition by the query module, and a query test case is shown:
[0130] SELECT / *t_employee index_test* / *FROM t_employee WHERE MATCH('{"match":{"address","tianjin"}}');
[0131] When using full-text index conditions for querying, the index conditions will first be pushed to the ES engine. The parameters of the MATCH function (custom Hive UDF function) are the actual query statements. In this example, it means to find the data rows containing tianjin in addree. The result set of the query in ES will be transmitted to Hive through the network. Hive will search in the original table t_employee according to the id column and return the final result set to the user;
[0132] Use the delete module to delete the full-text index, and finally delete the original table according to the processing module;
[0133] This two-level full-text indexing solution can achieve the effect described in the invention purpose, and can be applied to scenarios with strong full-text indexing requirements, such as log storage systems, personal information fusion systems, etc.; based on transaction log technology, it ensures strong data consistency between the original table and the index table, making it more reliable. At the same time, Hive and ES are both high-availability systems, making them highly available as a whole; at the same time, this technical method also deeply integrates the Hadoop ecosystem and the Elastic software stack, which is a major breakthrough;
[0134] Furthermore, the creation module specifically includes an editing module, a checking module and a building module:
[0135] Edit module: Add DDL keyword FULL;
[0136] Check module: CREATE FULL INDEX performs statement scanning, lexical analysis, and syntax checking. Create module: After the check passes, create the corresponding index table in the ES engine based on the DDL metadata information;
[0137] Hive Index DDL extension: Add the keyword FULL to make it effective in DDL statement scanning, lexical analysis, and syntax checking.
[0138] Hive natively supports the CREATE INDEX syntax. On this basis, we add the CREATE FULL INDEX syntax. The test case is as follows:
[0139] --Create the original table t_employee ddress VARCHAR(100) in Hive;
[0140] --Create a full-text index index_test based on the address column of the original table t_employee
[0141] CREATE FULL INDEX index_test ON t_employee(address);
[0142] At this time, the index table index_test will be created in the ES engine. The two-dimensional relationship between the original table and the index table is as follows: t_employee original table:
[0143]
[0144] index_test index table:
[0145]
[0146] This method expands the INDEX syntax and introduces the keyword FULL. When creating a full-text index, a full-text index table is created in the ES engine. When performing INSERT, UPDATE, and DELETE operations on the Hive original table, the same operations are performed on the ES engine table to ensure data consistency.
[0147] Furthermore, the operation module specifically includes a recording module, an original table operation module and an index table operation module:
[0148] Recording module: records the transaction log of this operation;
[0149] Original table operation module: INSERT, UPDATE, and DELETE are operated on the original table. If successful, they are executed downwards. If failed, they are returned to the record module.
[0150] Index table operation module: INSERT, UPDATE, and DELETE are performed on the index table. If the execution is successful, the transaction is committed. If the execution fails, the transaction is rolled back according to the transaction log.
[0151] When the original table performs INSERT, UPDATE, or DELETE operations, the index table will also perform corresponding operations;
[0152] When operating data in the index table, the corresponding restful interface statements will be generated and sent to the ES engine, such as Figure 3 As shown;
[0153] At the same time, the atomicity of the operations of the two tables is guaranteed through the transaction log, thereby ensuring the consistency of the data on both ends. At the same time, the successful submission or rollback of the transaction will be further determined based on the execution results of the ES engine;
[0154] Furthermore, the query module specifically includes a first parsing module, a second parsing module, a restful creation module, a return result query module and a result mapping module:
[0155] The first parsing module: parses the Hive driver syntax into an abstract syntax tree;
[0156] The second parsing module: the method tree query expression clause, the parsing restful query part;
[0157] RESTful creation module: creates RESTful query statements through DSLBuilder and pushes them down to the Elasticsearch engine;
[0158] Return result query module: Use Hive driver to query the result set returned by the ES engine as the RowKey set of the original table;
[0159] Result mapping module: uses Hive driver to map the result set into a relational table and returns it to the user;
[0160] Timing diagram Figure 4 As shown;
[0161] Abstract syntax tree parsing: Get the query condition part MATCH('{"match":{"address","tianjin"}}') in the abstract syntax tree. The query expression is a tree syntax structure. The content of the MATCH function and function parameters can be obtained by expression parsing;
[0162] The domain-specific language Builder module creates complete statements (including DDL, DML, and query statements) executed by the ES engine. It is responsible for constructing complete query statements for the ES engine based on the expressions obtained from the abstract syntax tree; constructing statements for creating the ES engine full-text index based on the metadata information of CREATEFULL INDEX; and constructing statements for deleting the ES engine index based on DROP INDEX.
[0163] Furthermore, the deletion module includes a metadata clearing module and an index table clearing module:
[0164] Metadata clearing module: deletes INDEX metadata in Hive;
[0165] Index table clearing module: deletes the corresponding index table in the ES engine;
[0166] When deleting the original table, an additional step is required, that is, if there is an index table associated with the original table, the index table is deleted first. This process is also atomic.
[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Hive secondary full-text indexing technology method based on Elasticsearch, Its characteristics are The specific steps of the method include: S1 creates a full-text index table for the Hive original data table using CREATE FULL INDEX. S2 synchronizes INSERT, UPDATE, and DELETE operations on the original table with the full-text index table in ES; S3 uses the full-text index condition to query the original table; S4 deletes the full-text index; S5 deletes the original table; The specific steps of S1 creating a full-text index table for the Hive original data table through CREATE FULL INDEX include: S101 added DDL keyword FULL; S102 performs statement scanning, lexical analysis, and syntax checking on CREATE FULL INDEX; After S103 passes the check, a corresponding index table is created in the ES engine according to the DDL metadata information; The specific steps of S2 synchronizing the original table INSERT, UPDATE, and DELETE operations with the full-text index table in ES include: S201 records the transaction log of this operation; S202 INSERT, UPDATE, and DELETE are performed on the original table. If successful, they are executed downwards. If failed, they return to S201. S203INSERT, UPDATE, and DELETE are performed on the index table. If successful, the transaction is committed. If failed, the transaction is rolled back according to the transaction log. The specific steps of using S3 full-text index conditions to query the original table include: S301 parses Hive driver syntax into an abstract syntax tree; S302 obtains a syntax tree query expression clause and parses a restful query part; S303 creates a restful query statement through DSLBuilder and pushes it down to the Elasticsearch engine; S304 uses the Hive driver to query the result set returned by the ES engine as the RowKey set of the original table; S305 uses Hive driver to map the result set into a relational table and returns it to the user.
2. According to the Hive secondary full-text indexing technology method based on Elasticsearch according to claim 1, Its characteristics are The specific steps of deleting the full-text index in S4 include: S401 deletes INDEX metadata in Hive; S402 deletes the corresponding index table in the ES engine.
3. A Hive secondary full-text indexing technology system based on Elasticsearch, Its characteristics are The system includes a creation module, an operation module, a query module, a deletion module and a processing module: Creation module: Create a full-text index table for the Hive original data table through CREATE FULL INDEX; Operation module: Synchronize the INSERT, UPDATE, and DELETE operations of the original table with the full-text index table in ES; Query module: use full-text index conditions to query the original table; Delete module: delete full-text index; Processing module: delete the original table; The creation module specifically includes an editing module, a checking module and a building module: Edit module: Add DDL keyword FULL; Check module: CREATE FULL INDEX performs statement scanning, lexical analysis, and syntax checking Establish module: after checking, create the corresponding index table in the ES engine according to the DDL metadata information; The operation module specifically includes a recording module, an original table operation module and an index table operation module: Recording module: records the transaction log of this operation; Original table operation module: INSERT, UPDATE, and DELETE are operated on the original table. If successful, they are executed downwards. If failed, they are returned to the record module. Index table operation module: INSERT, UPDATE, and DELETE are performed on the index table. If the execution is successful, the transaction is committed. If the execution fails, the transaction is rolled back according to the transaction log. The query module specifically includes a first parsing module, a second parsing module, a restful creation module, a return result query module and a result mapping module: The first parsing module: parses the Hive driver syntax into an abstract syntax tree; The second parsing module: the method tree query expression clause, the parsing restful query part; RESTful creation module: creates RESTful query statements through DSLBuilder and pushes them down to the Elasticsearch engine; Return result query module: Use Hive driver to query the result set returned by the ES engine as the RowKey set of the original table; Result mapping module: Uses Hive driver to map the result set into a relational table and returns it to the user.
4. According to claim 3, the Hive secondary full-text indexing technology system based on Elasticsearch, Its characteristics are The deletion module includes a metadata clearing module and an index table clearing module: Metadata clearing module: deletes INDEX metadata in Hive; Index table clearing module: deletes the corresponding index table in the ES engine.
