A method and system for implementing hbase multi-condition query based on solr

A multi-condition, query request technology, applied in the field of big data, can solve problems such as difficulty in meeting query requirements, and achieve the effects of satisfying multi-condition queries, reducing query time, and improving query efficiency

Active Publication Date: 2019-09-13
SHENZHEN IBOX INFORMATION TECH CO LTD
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] The purpose of the embodiment of the present invention is to provide a method for realizing HBase multi-condition query based on Solr, aiming to solve the problem that the existing way of realizing multi-condition query function requires full table scanning when querying HBase table, and it is difficult to meet more query requirements

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for implementing hbase multi-condition query based on solr
  • A method and system for implementing hbase multi-condition query based on solr
  • A method and system for implementing hbase multi-condition query based on solr

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0032] figure 1 It is the implementation flowchart of the method for implementing HBase multi-condition query based on Solr provided by the embodiment of the present invention, and is described in detail as follows:

[0033] In step S101, the Solr server obtains the multi-condition query request submitted by the client;

[0034] In step S102, using the pre-established index supporting the multi-condition query request, return the data table row key RowKey set of the multi-condition query request to the client;

[0035] Wherein, the element of the RowKey set is a data table row key, and the data table row key is a row key of a data table in the open source database HBase.

[0036] Wherein, the data row includes a data table row key.

[0037] By associating the index supporting the multi-condition query request with the data row, the association of the index supporting the multi-condition query request and the row key of the data table in the data row is completed.

[0038] B...

Embodiment 2

[0042] The embodiment of the present invention describes the implementation process of establishing an index that supports multi-condition query requests, and the details are as follows:

[0043] The operation code of the external request, the name of the data table, the current timestamp and the row key of the data table are spliced ​​into the row key of the cache table, and an index supporting multi-condition query requests is established for the data row.

[0044] Among them, the row key of the cache table includes the following characteristics:

[0045] Operation code + data table name + timestamp + data table row key (RowKey), the structure adopted is as follows:

[0046]

[0047] Among them, the operation code, data table name, timestamp and the positional relationship of the data table row key in the data row need to agree on the order among the index building process, index deletion process and query process.

Embodiment 3

[0049] figure 2 It is an implementation flowchart of establishing an index that supports multi-condition query requests provided by the embodiment of the present invention, and is described in detail as follows:

[0050] In step S201, the splicing request is received, and the opcode, data table name, current timestamp and data table row key in the splicing request are spliced ​​into the row key of the cache table;

[0051] In step S202, before the cache table warehousing thread is started, the preput () hook of the cache table is used to start the data table warehousing thread first, and when the data table warehousing thread is completed, the preput () hook of the cache table returns. The cache table warehousing thread continues to run, and at the same time, the postput() hook of the data table starts the Solr warehousing thread first, and then starts the confirmation thread. Using the confirmation thread, it is confirmed that the data row does not exist in the data table or...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention belongs to the field of big data, and provides a method and system for achieving HBase multi-condition query based on Solr. The method includes the steps that when a client submits a multi-condition query request to an HBase table, a pre-established index is queried from an Solr server according to query conditions, an HBase table RowKey set is returned to the client, the HBase table is directly queried according to RowKey, and a final result is returned, wherein elements of the RowKey set are database table row keys. The method and system solve the problem that in an existing mode of achieving the multi-condition query function, full-table scanning is needed in the process of querying the HBase table, which can not meet more query requirements. The method and system have the advantages that on one hand, full-table scanning is not needed in the process of querying the HBase table, query time is shortened, and query efficiency is improved; on the other hand, high flexibility is achieved, multi-condition query requirements can be met, and the intelligent degree of query is improved.

Description

technical field [0001] The invention belongs to the field of big data, and in particular relates to a method and a system for realizing HBase multi-condition query based on Solr. Background technique [0002] HBase is a distributed, column-oriented open source database. It sorts and stores data according to the row key dictionary of the data table. When using a single data table row key for query, the query efficiency is very efficient. However, this single query method cannot meet more query requirements. If you need to realize the random combination of multi-condition query functions similar to relational databases, you can use the following two methods: [0003] 1. The first way: [0004] Use the filter native application programming interface (Application Programming Interface, API) provided by HBase. This method is convenient and simple to use, but it has great limitations. When the amount of data in the table is relatively large, the query speed will be very slow if ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/2453
Inventor 石祖恒边浩男黄利庆韩昌雷
Owner SHENZHEN IBOX INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products