[go: up one dir, main page]

CN102779185B - High-availability distribution type full-text index method - Google Patents

High-availability distribution type full-text index method Download PDF

Info

Publication number
CN102779185B
CN102779185B CN201210226357.2A CN201210226357A CN102779185B CN 102779185 B CN102779185 B CN 102779185B CN 201210226357 A CN201210226357 A CN 201210226357A CN 102779185 B CN102779185 B CN 102779185B
Authority
CN
China
Prior art keywords
index
node
burst
message
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210226357.2A
Other languages
Chinese (zh)
Other versions
CN102779185A (en
Inventor
陈岭
鲁伟明
余斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201210226357.2A priority Critical patent/CN102779185B/en
Publication of CN102779185A publication Critical patent/CN102779185A/en
Application granted granted Critical
Publication of CN102779185B publication Critical patent/CN102779185B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a high-availability distribution type full-text index method. The method comprises the following steps of: firstly, starting a basic service system, and then starting an index cluster service and an inquiry cluster service on each node; establishing, updating and deleting an index on full-text data; and finally, inquiring the index. According to the high-availability distribution type full-text index method, an inquiring and indexing process can be separated and the increment or batch type establishment of existing indexes can be simultaneously supported; the batch type indexes can be used for establishing an index for large-scale data in short time; and the increment type indexes avoid reestablishing the index. Index files can be divided into three layers of structures comprising an index file, an index fragment and an index sub-fragment, thus enhancing the expandability and the availability of the index file. According to the high-availability distribution type full-text index method, a dynamic index task configuration task is provided; and parameters in the index task are arranged to dynamically meet requirements of establishing the index by a user through different types of data.

Description

一种高可用分布式全文索引方法A high-availability distributed full-text index method

技术领域 technical field

本发明涉及信息索引和搜索领域,更具体而言,涉及一种针对海量文本数据构建分布式全文索引并且提供高可用的查询服务的方法。 The invention relates to the field of information indexing and searching, and more specifically, relates to a method for constructing a distributed full-text index for massive text data and providing highly available query services.

背景技术 Background technique

随着互联网的发展,尤其是Web2.0的出现,文本信息量呈指数级速度增长。用户希望能够有效的管理海量文本数据,并对这些文本进行快速的搜索得到相应的信息。 With the development of the Internet, especially the emergence of Web2.0, the amount of text information is increasing exponentially. Users want to be able to effectively manage massive text data, and quickly search these texts to obtain corresponding information.

Google,百度,必应等搜索引擎的出现,满足了用户对于信息搜索的需求。而搜索引擎所采用的核心技术就是通过网络爬虫收集网络中的各类数据信息,对这些数据进行索引,然后对外提供查询服务。由于随着数据信息的不断增长,所建立的索引文件规模大小也随之增长,导致单机服务器已经无法保存所有的索引文件。此外,建立单一巨大的索引文件所耗费的时间以及在该索引文件上执行查询的时间也不断增加,导致无法满足海量客户查询需求。一个可行方案是将单个索引文件切分成多个索引分片,并将每一个索引分片分布存储在不同的主机上,最后对外提供索引服务。然而通过对业界所采取的若干方案研究,发现这些方案都存在以下几个突出的缺点: The emergence of search engines such as Google, Baidu, and Bing has met the needs of users for information search. The core technology used by search engines is to collect various data information in the network through web crawlers, index these data, and then provide query services to the outside world. As the data information continues to grow, the size of the created index files also increases, resulting in the stand-alone server having been unable to save all the index files. In addition, the time spent on building a single huge index file and the time spent on executing queries on the index file are also increasing, resulting in the inability to meet the query requirements of a large number of customers. A feasible solution is to divide a single index file into multiple index shards, distribute and store each index shard on different hosts, and finally provide indexing services externally. However, through the study of several schemes adopted by the industry, it is found that these schemes have the following outstanding shortcomings:

1、索引与查询服务是相关联的,即索引服务建立的本地索引文件直接为查询提供服务。然而,查询与索引集群的紧耦合导致二者不可分离,在容错性和系统复杂性上发生故障的可能性大大增加。 1. The index and the query service are associated, that is, the local index file created by the index service directly provides services for the query. However, the tight coupling of query and index cluster makes the two inseparable, and the possibility of failure in terms of fault tolerance and system complexity is greatly increased.

2、常见的分布式索引系统采取索引分片或者索引复制的方法来增加分布式索引扩展性以及可用性。然而,它们所采用的分片策略通常是按照数据的属性来划分,因此产生固定数目的索引分片,而每一个索引分片的大小却急剧增大。此外,另一些分布式索引系统按固定大小划分索引,在查询过程中需要对所有的索引分片进行查询,增加查询的时间以及网络的开销。 2. Common distributed index systems adopt index sharding or index replication to increase the scalability and availability of distributed indexes. However, the sharding strategies they adopt are usually divided according to the attributes of the data, thus generating a fixed number of index shards, while the size of each index shard increases dramatically. In addition, some other distributed index systems divide the index according to a fixed size, and all index fragments need to be queried during the query process, which increases the query time and network overhead.

3、一般而言分布式索引系统都是为了满足特定的需求,不能支持动态对不同类别的数据进行索引操作。因此如果需要对新的索引域进行索引,需要停止分布式索引集群,重新部署索引任务,重启索引集群以重新建立相应的索引。 3. Generally speaking, distributed indexing systems are designed to meet specific needs and cannot support dynamic indexing operations on different types of data. Therefore, if you need to index a new index domain, you need to stop the distributed index cluster, redeploy the index task, and restart the index cluster to re-establish the corresponding index.

4、当前的分布式索引系统采用多节点备份实现系统容灾。当索引集群的节点发生故障的,使用系统中其它节点的备份对其进行恢复,然而如果这些存在备份的节点同时发生故障,那么失效节点上的索引就无法正常恢复。 4. The current distributed index system uses multi-node backup to achieve system disaster recovery. When a node in the index cluster fails, use the backups of other nodes in the system to restore it. However, if these backup nodes fail at the same time, the index on the failed node cannot be restored normally.

通过以上的分析,可以知道当前的分布式索引系统中存在诸多问题。 Through the above analysis, we can know that there are many problems in the current distributed index system.

发明内容 Contents of the invention

本发明的目的在于针对现有技术的不足,提供一种高可用分布式全文索引方法 The purpose of the present invention is to provide a highly available distributed full-text indexing method for the deficiencies of the prior art

本发明的目的是通过以下技术方案来实现的:一种高可用分布式全文索引方法,该方法包括以下步骤: The purpose of the present invention is achieved through the following technical solutions: a highly available distributed full-text indexing method, the method comprising the following steps:

(1)启动基础服务系统,包括分布式文件系统、分布式列式数据库以及元数据目录服务;所述分布式文件系统用于存储索引节点建立的索引文件,同时为查询集群中的节点提供索引文件;所述分布式列式数据库用于提供本发明中的操作日志服务,操作日志存储本发明执行的各项操作,此外,分布式列式数据库还用于存储原始全文数据文件,分布式列式数据库应支持按列存储数据;元数据目录服务实现元数据的存储; (1) Start the basic service system, including distributed file system, distributed columnar database and metadata directory service; the distributed file system is used to store the index files created by index nodes, and provide indexes for querying nodes in the cluster file; the distributed column database is used to provide the operation log service in the present invention, and the operation log stores various operations performed by the present invention. In addition, the distributed column database is also used to store original full-text data files, and the distributed column The database should support storing data by columns; the metadata directory service realizes the storage of metadata;

(2)在各个节点上启动索引集群服务和查询集群服务,其中,索引集群服务包括索引主节点服务和索引节点服务,查询集群服务包括查询主节点服务和查询节点服务;该步骤具体为:首先,索引主节点和搜索主节点分别启动,进入安全模式,并分别扫描并监听元数据目录中索引节点和查询节点目录节点,以分别管理这些目录下的节点;其次,索引节点和查询节点启动,并将自身的信息注册到元数据节点目录之上,此时索引主节点和搜索主节点监听到消息,将新加入的节点纳入自身管理之中;最后,如果在安全模式下,节点不在发生变化,那么退出安全模式;至此完成了整个分布式全文索引系统启动的过程; (2) Start the index cluster service and query cluster service on each node, where the index cluster service includes the index master node service and the index node service, and the query cluster service includes the query master node service and the query node service; the steps are as follows: first , the index master node and the search master node are started separately, enter the safe mode, and scan and monitor the index nodes and query node directory nodes in the metadata directory respectively, so as to manage the nodes under these directories respectively; secondly, the index node and query node are started, And register its own information on the metadata node directory. At this time, the index master node and the search master node listen to the news, and incorporate the newly added node into its own management; finally, if the node is in safe mode, the node does not change , then exit the safe mode; so far the entire process of starting the distributed full-text indexing system has been completed;

(3)在全文数据上创建索引、更新索引、删除索引;其中,创建索引包括增量式创建索引和批量式创建索引;该步骤通过以下子步骤来实现: (3) Create indexes, update indexes, and delete indexes on full-text data; among them, index creation includes incremental index creation and batch index creation; this step is implemented through the following sub-steps:

(3.1)所述的增量式创建索引,需要用户在索引任务定义中将创建索引的模式设置为增量式模式;增量式创建索引的过程包括: The incremental index creation described in (3.1) requires the user to set the index creation mode to incremental mode in the index task definition; the process of incremental index creation includes:

(3.1.1)当数据插入到存储系统中,触发增量建立索引的任务,索引主节点通过反射机制实例化索引任务定义中的索引分片策略,判定该数据的索引归属于哪一个索引分片,此后从元数据目录中读取索引分片与索引节点的映射关系,找到负责建立该索引分片的索引节点;最后将节点ID写入到消息中; (3.1.1) When data is inserted into the storage system and triggers the task of creating an incremental index, the index master node instantiates the index fragmentation strategy in the index task definition through the reflection mechanism, and determines which index segment the index of the data belongs to. After that, read the mapping relationship between the index fragment and the index node from the metadata directory, and find the index node responsible for establishing the index fragment; finally, write the node ID into the message;

(3.1.2)索引主节点将3.1.1生成的消息通过远程调用的方式将该消息随机塞到任意一个索引节点的本地消息队列中; (3.1.2) The index master node randomly inserts the message generated in 3.1.1 into the local message queue of any index node through remote calling;

(3.1.3)索引节点读取对应的消息,如果该消息属于该节点,那么获取消息后的索引节点会根据消息中的数据主键从数据存储系统中读出数据,封装成索引单元,否则此消息不属于该节点,那么通过远程调用以及消息中的节点信息将该消息转发到对应索引节点; (3.1.3) The index node reads the corresponding message. If the message belongs to the node, the index node after obtaining the message will read the data from the data storage system according to the data primary key in the message and encapsulate it into an index unit. Otherwise, the If the message does not belong to the node, then forward the message to the corresponding index node through the remote call and the node information in the message;

(3.1.3)索引节点处理该消息,如果不存在与该消息对应索引处理器,则创建索引处理器,并根据索引任务定义实例化索引器;索引器读入索引单元,根据索引任务中的预定义索引域,对存储于索引单元中的数据进行索引,同时在操作日志1中记录索引分片ID与操作消息,并且在操作日志2中记录数据主键与对应的索引子分片的名字; (3.1.3) The index node processes the message. If there is no index processor corresponding to the message, create an index processor and instantiate the indexer according to the index task definition; the indexer reads the index unit, and according to the index task in the index task Predefine the index field, index the data stored in the index unit, record the index fragment ID and operation message in the operation log 1, and record the data primary key and the name of the corresponding index sub-shard in the operation log 2;

(3.1.4)如果此时满足索引子分片文件上传的条件且此时该索引处理器中合并线程不在运行,那么停止当前的索引子分片文件上的索引器,新建一个文件目录作为新的索引器的索引目录,转步骤3.1.3;上传索引文件线程并执行步骤3.1.5;否则依然将索引建在本地的索引子分片目录之下,转步骤3.1.3; (3.1.4) If the conditions for uploading the index sub-shard file are met at this time and the merge thread in the index processor is not running at this time, then stop the indexer on the current index sub-shard file and create a new file directory as the new For the index directory of the indexer, go to step 3.1.3; upload the index file thread and go to step 3.1.5; otherwise, still build the index under the local index sub-shard directory, go to step 3.1.3;

(3.1.5)将旧的索引子分片文件重新命名为合并文件,设置索引正在合并的标志,并且在合并文件目录上启动一个索引文件合并线程,将索引文件合并;上传索引文件线程将合并的结果上传到分布式文件系统中的索引子分片文件目录;并且将新增索引子分片的操作消息插入到元数据目录中的Master_queue上; (3.1.5) Rename the old index sub-shard file to a merged file, set the flag that the index is being merged, and start an index file merge thread on the merged file directory to merge the index files; the upload index file thread will merge The result of uploading to the index sub-shard file directory in the distributed file system; and inserting the operation message of adding a new index sub-shard to the Master_queue in the metadata directory;

(3.1.6)如果上传成功,那么就删除与该索引分片对应的索引操作日志1,否则跳转至步骤3.1.5重复上传索引分片的过程; (3.1.6) If the upload is successful, delete the index operation log 1 corresponding to the index fragment, otherwise skip to step 3.1.5 and repeat the process of uploading the index fragment;

(3.2)更新索引的过程包括: (3.2) The process of updating the index includes:

(3.2.1)更新数据的操作触发更新索引的任务,索引主节点根据索引分片策略判定该数据归属于哪一个索引分片,并从元数据目录上读取索引分片与索引节点的映射关系,找到对应的索引节点; (3.2.1) The operation of updating data triggers the task of updating the index. The index master node determines which index shard the data belongs to according to the index sharding strategy, and reads the mapping between the index shard and the index node from the metadata directory Relationship, find the corresponding index node;

(3.2.2)索引主节点通过远程调用将生成的更新索引消息传递给任意索引节点的本地消息队列,该索引节点从中读取对应的更新消息,如果该消息不属于当前节点,那么该节点根据消息中的节点信息将消息转发到真正的处理节点; (3.2.2) The index master node passes the generated update index message to the local message queue of any index node through remote calls, and the index node reads the corresponding update message from it. If the message does not belong to the current node, then the node according to The node information in the message forwards the message to the real processing node;

(3.2.3)获取更新消息后的索引节点会根据消息中的信息,根据数据ID在该索引分片的操作日志2中查找对应的索引子分片,将索引子分片ID写入消息中,如果此时索引子分片在本地磁盘上,转步骤3.2.4;否则转步骤3.2.5; (3.2.3) After obtaining the update message, the index node will search for the corresponding index sub-shard in the operation log 2 of the index shard according to the information in the message and the data ID, and write the index sub-shard ID into the message , if the index sub-shard is on the local disk at this time, go to step 3.2.4; otherwise, go to step 3.2.5;

(3.2.4)根据该数据的文档主键,如果此时该数据的索引在本地的索引子分片之中,直接更新对应的索引;并在操作日志1中记录索引分片ID和对应的消息,转步骤3.2.2; (3.2.4) According to the document primary key of the data, if the index of the data is in the local index sub-shard at this time, directly update the corresponding index; and record the index shard ID and corresponding message in operation log 1 , turn to step 3.2.2;

(3.2.5)判定当前更新缓存队列中的消息数目是否到达阈值,如果没有到达则将该消息存入该队列,返回步骤3.2.2;否则转步骤3.2.6; (3.2.5) Determine whether the number of messages in the current update cache queue reaches the threshold, if not, store the message in the queue, and return to step 3.2.2; otherwise, go to step 3.2.6;

(3.2.6)将更新缓存队列中的消息全部交给处理队列,启动更新线程,更新线程处理每一个消息,根据每一个数据主键和索引子分片的对应关系,生成索引子分片与索引主键的一对多映射关系,此后,从分布式文件系统中将索引子分片下载本地磁盘,在该分片上实例化出索引处理器以及对应的索引器,根据消息中的数据主键从分布式列式数据库中读取数据,封装成索引单元并执行更新索引操作,成功之后在操作日志1中记录该索引子分片执行的更新操作; (3.2.6) Hand over all the messages in the update cache queue to the processing queue, start the update thread, and the update thread processes each message, and generates index sub-shards and indexes according to the correspondence between each data primary key and index sub-shard The one-to-many mapping relationship of the primary key. After that, the index sub-shard is downloaded from the distributed file system to the local disk, and the index processor and the corresponding indexer are instantiated on the shard. According to the data primary key in the message, the distributed Read data in the columnar database, encapsulate it into an index unit, and perform an update index operation. After success, record the update operation performed by the index sub-shard in operation log 1;

(3.2.7)当完成该索引子分片中所有更新操作,关闭在该目录上的索引器,并将更新目录中的索引文件上传至分布式索引子分片的目录;删除操作日志1中与该索引子分片相关的操作记录,同样的操作重复执行直至遍历完映射关系; (3.2.7) When all update operations in the index sub-shard are completed, close the indexer on the directory, and upload the index file in the update directory to the directory of the distributed index sub-shard; delete the operation log 1 For the operation records related to the index sub-shard, the same operation is repeated until the mapping relationship is traversed;

(3.3)删除索引的过程包括: (3.3) The process of deleting an index includes:

(3.3.1)删除数据的操作触发删除索引的任务,索引主节点根据索引分片策略判定该数据归属于哪一个索引分片,并从元数据目录上读取索引分片与索引节点的映射关系,找到对应的索引节点; (3.3.1) The operation of deleting data triggers the task of deleting the index. The index master node determines which index shard the data belongs to according to the index sharding strategy, and reads the mapping between the index shard and the index node from the metadata directory Relationship, find the corresponding index node;

(3.3.2)索引主节点通过远程调用将生成的删除索引消息传递给任意索引节点的本地消息队列,该索引节点从中读取对应的删除消息,如果该消息不属于当前节点,那么该节点根据消息中的节点信息将消息转发到真正的处理节点; (3.3.2) The index master node passes the generated delete index message to the local message queue of any index node through remote calls, and the index node reads the corresponding delete message from it. If the message does not belong to the current node, then the node according to The node information in the message forwards the message to the real processing node;

(3.3.3)获取删除消息后的索引节点会根据消息中的信息,根据数据ID在该索引分片的操作日志2中查找对应的索引子分片,将索引子分片ID写入消息中,如果此时索引子分片在本地磁盘上,转步骤3.3.4;否则转步骤3.3.5; (3.3.3) The index node after obtaining the deletion message will search for the corresponding index sub-shard in the operation log 2 of the index shard according to the information in the message and the data ID, and write the index sub-shard ID into the message , if the index sub-shard is on the local disk at this time, go to step 3.3.4; otherwise, go to step 3.3.5;

(3.3.4)根据该数据的文档主键,如果此时该数据的索引在本地的索引子分片之中,直接删除对应的索引;并在操作日志1中记录索引分片ID和对应的消息,转步骤3.3.2; (3.3.4) According to the document primary key of the data, if the index of the data is in the local index sub-shard at this time, directly delete the corresponding index; and record the index shard ID and corresponding message in operation log 1 , turn to step 3.3.2;

(3.3.5)判定当前删除缓存队列中的消息数目是否到达阈值,如果没有到达则将该消息存入该队列,返回步骤3.3.2;否则转步骤3.3.6; (3.3.5) Determine whether the number of messages in the current deletion cache queue reaches the threshold, if not, store the message in the queue, and return to step 3.3.2; otherwise, go to step 3.3.6;

(3.3.6)将删除缓存队列中的消息全部交给处理队列,启动删除线程,删除线程处理每一个消息,根据每一个数据主键和索引子分片的对应关系,生成索引子分片与索引主键的一对多映射关系,此后,从分布式文件系统中将索引子分片下载本地磁盘,在该分片上实例化出索引处理器以及对应的索引器,根据消息中的数据主键从分布式列式数据库中读取数据,封装成索引单元并执行删除索引操作,成功之后在操作日志1中记录该索引子分片执行的删除操作; (3.3.6) Hand over all the messages in the deletion cache queue to the processing queue, start the deletion thread, and the deletion thread processes each message, and generates index sub-shards and indexes according to the correspondence between each data primary key and index sub-shard The one-to-many mapping relationship of the primary key. After that, the index sub-shard is downloaded from the distributed file system to the local disk, and the index processor and the corresponding indexer are instantiated on the shard. According to the data primary key in the message, the distributed Read the data in the columnar database, encapsulate it into an index unit and execute the delete index operation, and record the delete operation performed by the index sub-shard in the operation log 1 after success;

(3.3.7)当完成该索引子分片中所有删除操作,关闭在该目录上的索引器,并将删除目录中的索引文件上传至分布式索引子分片的目录;删除操作日志1中与该索引子分片相关的操作记录,同样的操作重复执行直至遍历完映射关系; (3.3.7) When all deletion operations in the index sub-shard are completed, close the indexer on the directory, and upload the index file in the deleted directory to the directory of the distributed index sub-shard; delete operation log 1 For the operation records related to the index sub-shard, the same operation is repeated until the mapping relationship is traversed;

(3.4)所述的批量式索引模式是当用户在索引任务定义中定义了批量式建立索引模式,此时,索引主节点将模式转换为批量式索引模式,批量式索引方法具体包含以下步骤: The batch indexing mode described in (3.4) is when the user defines a batch indexing mode in the index task definition. At this time, the index master node converts the mode into a batch indexing mode. The batch indexing method specifically includes the following steps:

(3.4.1)调用MapReduce框架,在Map阶段调用索引分片策略,将数据划分为n个数据集合;然后将每个数据集合中的数据随机划分到若干个索引节点上; (3.4.1) Call the MapReduce framework, call the index fragmentation strategy in the Map stage, and divide the data into n data sets; then divide the data in each data set randomly into several index nodes;

(3.4.2)每个索引节点对划分的数据根据其所属的索引分片,分别建立索引子分片,每一个索引子分片按照大小划分,当索引子分片大小超过阈值,则创建新的索引子分片; (3.4.2) Each index node creates index sub-shards according to the index shards it belongs to. Each index sub-shard is divided according to size. When the size of the index sub-shard exceeds the threshold, a new index sub-shard is created. index sub-shards;

(3.4.3)在Reduce阶段,每个索引节点将自身中索引子分片文件合并到的对应的索引分片文件,将会生成n个索引分片文件; (3.4.3) In the Reduce phase, each index node merges its own index sub-shard files into the corresponding index shard files, and will generate n index shard files;

(3.4.4)当完成批量式建索引任务之后,索引主节点在元数据目录下的Master_queue下写入载入索引分片的操作;查询主节点根据此操作通过节点选择策略将索引分片分配给若干个查询节点,并且在元数据目录下的Node_queue中写入载入索引分片的操作,各个对应的查询节点执行此操作,载入对应的索引; (3.4.4) After completing the batch index building task, the index master node writes the operation of loading index fragments under the Master_queue under the metadata directory; the query master node allocates the index fragments through the node selection strategy according to this operation Give several query nodes, and write the operation of loading index fragments in the Node_queue under the metadata directory, each corresponding query node executes this operation, and loads the corresponding index;

(4)查询索引,包括以下子步骤: (4) Query the index, including the following sub-steps:

(4.1)查询客户端根据查询内容生成分布式查询,对该查询进行解析,产生对应的解析结果; (4.1) The query client generates a distributed query according to the query content, analyzes the query, and generates the corresponding analysis result;

(4.2)此后查询客户端利用步骤4.1中产生的结果,调用本地的查询节点选择策略;该策略会远程调用查询主节点上的索引分片选择策略,根据元数据目录保存的查询节点与索引分片的信息,决定该查询属于哪些索引分片,由于一个索引分片有多个索引子分片,因此根据元数据目录中索引子分片与查询节点的映射关系,利用负载均衡技术从这些节点中选择负载最轻的查询节点,生成与该查询相对应的查询节点列表;最后,将该列表返回给查询客户端; (4.2) Afterwards, the query client uses the results generated in step 4.1 to call the local query node selection strategy; this strategy will remotely call the index fragment selection strategy on the query master node, according to the query node and index partition stored in the metadata directory. segment information to determine which index shards the query belongs to. Since an index shard has multiple index sub-shards, according to the mapping relationship between index sub-shards and query nodes in the Select the query node with the lightest load in , and generate a query node list corresponding to the query; finally, return the list to the query client;

(4.3)查询客户端获取该查询节点列表,通过远程调用的方法,并行向这些查询节点发布查询请求; (4.3) The query client obtains the query node list, and issues query requests to these query nodes in parallel through the method of remote calling;

(4.4)查询节点执行该查询请求,通过一个线程池在不同的索引分片之上查询对应的结果,将结果返回给查询客户端; (4.4) The query node executes the query request, queries the corresponding results on different index fragments through a thread pool, and returns the results to the query client;

(4.5)客户端获取各个查询节点的查询结果之后,对查询结果进行合并操作,完成整个查询过程。 (4.5) After the client obtains the query results of each query node, it merges the query results to complete the entire query process.

本发明的有益效果是,首先,本发明分离查询与索引过程,使二者相互透明。优点在于索引集群可以同时支持增量式或批量式地建立索引。批量式索引可以满足短时间对大规模数据建立索引的需求。而增量式索引可以避免对已建立好的索引文件进行重建操作。另一方面,查询集群只需要从分布式文件系统中读取索引文件,而并不要求索引文件是如何建立的。其次,本发明将索引文件划分为三层结构,在索引分片的基础上再将其划分为索引子分片,以增强索引文件的扩展性。在查询集群中以索引子分片为单元,将索引子分片的拷贝复制到多个查询节点,提高索引文件的可用性。再次,本发明提供动态索引任务配置服务,通过设置索引任务中的参数,能够满足用户对不同数据建立索引的需求。最后,本发明记录了每一个操作的日志,当系统中节点发生故障,可以根据该日志对该节点中所有为备份的操作进行恢复。 The beneficial effect of the present invention is that, firstly, the present invention separates the query and index process, making the two mutually transparent. The advantage is that the index cluster can support incremental or batch indexing at the same time. Batch indexing can meet the demand for indexing large-scale data in a short time. Incremental indexing can avoid rebuilding the established index files. On the other hand, querying the cluster only needs to read index files from the distributed file system, and does not require how the index files are created. Secondly, the present invention divides the index file into a three-layer structure, and further divides it into index sub-shards on the basis of index fragments, so as to enhance the expansibility of the index files. In the query cluster, the index sub-shard is used as a unit, and the copy of the index sub-shard is copied to multiple query nodes to improve the availability of index files. Thirdly, the present invention provides a dynamic indexing task configuration service, by setting parameters in the indexing task, it can meet user's requirements for indexing different data. Finally, the present invention records a log of each operation, and when a node in the system fails, all backup operations in the node can be restored according to the log.

附图说明 Description of drawings

图1是分布式全文索引系统的架构图; Figure 1 is an architecture diagram of a distributed full-text indexing system;

图2是分布式全文索引系统的索引文件的组织结构图; Fig. 2 is an organizational structure diagram of an index file of a distributed full-text indexing system;

图3是索引文件在分布式全文索系统中的分布图; Fig. 3 is a distribution diagram of index files in the distributed full-text search system;

图4是分布式全文索引系统的元数据目录结构图; Fig. 4 is a metadata directory structure diagram of the distributed full-text indexing system;

图5是分布式全文索引系统索引主节点启动流程图; Fig. 5 is a flow chart of starting the index master node of the distributed full-text index system;

图6是分布式全文索引系统索引节点启动流程图; Fig. 6 is a flow chart of starting an index node of the distributed full-text indexing system;

图7是分布式全文索引系统查询主节点启动流程图; Fig. 7 is a flow chart of starting the query master node of the distributed full-text indexing system;

图8是分布式全文索引系统查询节点启动流程图; Fig. 8 is a flow chart of starting the query node of the distributed full-text index system;

图9是分布式全文索引系统建立索引的流程图; Fig. 9 is a flow chart of building an index in the distributed full-text indexing system;

图10是分布式全文索引系统删除和更新索引的流程图; Fig. 10 is a flowchart of deleting and updating indexes in the distributed full-text indexing system;

图11是分布式全文索引系统执行查询的流程图; Fig. 11 is a flow chart of executing a query by the distributed full-text indexing system;

图12是分布式全文索引系统批量式索引示意图。 Fig. 12 is a schematic diagram of batch indexing in the distributed full-text indexing system.

具体实施方式 Detailed ways

本发明的主要目的是提出建立一个分布式全文索引系统的方法。分布式全文索引系统对外提供海量文本索引和查询服务。下面参照附图对本发明进行全面详实的描述。如图1所示,通过本发明所使用的一个高可用分布式全文索引的方法可以构建一个分布式全文索引系统。一个完整的分布式全文索引方法应该由以下几个步骤构成: The main purpose of the present invention is to propose a method for establishing a distributed full-text index system. The distributed full-text indexing system provides massive text indexing and query services to the outside world. The present invention will be fully and detailedly described below with reference to the accompanying drawings. As shown in FIG. 1 , a distributed full-text index system can be constructed through a high-availability distributed full-text index method used in the present invention. A complete distributed full-text indexing method should consist of the following steps:

1、启动基础服务系统,包括分布式文件系统、分布式列式数据库以及元数据目录服务。分布式文件系统可以采用Hadoop的分布式文件系统HDFS,分布式数据库可以采用HBase,元数据目录服务可以采用Zookeeper来实现。上述的几个系统都可以采用与其功能相同的其他系统代替。 1. Start the basic service system, including distributed file system, distributed columnar database and metadata directory service. The distributed file system can use Hadoop's distributed file system HDFS, the distributed database can use HBase, and the metadata directory service can be implemented using Zookeeper. All the above-mentioned systems can be replaced by other systems with the same functions.

1.1、所述分布式文件系统用于存储索引节点建立的索引文件,同时为查询集群中的查询节点提供索引文件。该分布式文件系统应该支持存储海量数据,且保证数据的安全性以及可用性,防止因系统故障导致数据缺失。 1.1. The distributed file system is used to store the index files created by the index nodes, and at the same time provide the index files for the query nodes in the query cluster. The distributed file system should support the storage of massive data, ensure data security and availability, and prevent data loss due to system failure.

1.2、所述分布式列式数据库用于提供本发明中的操作日志服务,操作日志存储本发明所采用的方法中执行的各项操作。此外,分布式列式数据库还用于存储原始全文数据文件。分布式列式数据库应支持按列存储数据。所述的操作日志包括操作日志1与操作日志2。二者格式如下表所示: 1.2. The distributed columnar database is used to provide the operation log service in the present invention, and the operation log stores various operations performed in the method adopted in the present invention. In addition, distributed columnar databases are used to store raw full-text data files. A distributed columnar database should support storing data in columns. The operation log includes operation log 1 and operation log 2. The formats of the two are shown in the table below:

表1:操纵日志1 Table 1: Manipulation log 1

索引分片IDIndex shard ID 消息1message 1 消息2message 2 消息imessage i 消息nnews n

表2:操纵日志2 Table 2: Manipulation log 2

数据主键data primary key 索引子分片IDIndex sub-shard ID

    1.2.1、所述的操作日志1用于系统容灾。其中“索引分片ID”表示索引分片名字。本发明将索引文件划分为三层结构,如图2所示。在图中,一个特定的索引文件是由特定数目的索引分片文件组成。具体而言,可以根据特定的索引分片策略来决定每个数据归属于哪一个索引分片之中。本发明默认提供了一些索引分片策略,例如根据数据属性来划分,包括按照时间,按照文档ID值取模等。用户也可以自定义特定的索引分片策略,以满足不同应用场景下对于数据划分的需求。每一个索引分片文件又可以根据用户设定的阈值划分成索引子分片。三级不同索引文件在系统中的分布如图3所示。 1.2.1. The operation log 1 described above is used for system disaster recovery. The "index fragment ID" indicates the name of the index fragment. The present invention divides the index file into a three-layer structure, as shown in FIG. 2 . In the figure, a specific index file is composed of a specific number of index shard files. Specifically, which index shard each data belongs to can be determined according to a specific index sharding strategy. The present invention provides some index sharding strategies by default, such as dividing according to data attributes, including taking modulo according to time and document ID values, etc. Users can also customize specific index sharding strategies to meet the needs of data partitioning in different application scenarios. Each index shard file can be divided into index sub-shards according to the threshold set by the user. The distribution of three different index files in the system is shown in Figure 3.

    所述的“消息i”中包含数据存储在分布式列式数据库中的主键ID以及操作类型。其中操作类型包括:建立,更新以及删除索引操作。索引分片的ID或索引子分片ID记录的是该数据归属于哪一个索引分片或子分片。消息格式如下表所示: The "message i" mentioned above contains the primary key ID and operation type of the data stored in the distributed columnar database. The operation types include: create, update and delete index operations. The index shard ID or index sub-shard ID records which index shard or sub-shard the data belongs to. The message format is shown in the table below:

数据主键data primary key 操作类型operation type 索引分片ID/索引子分片IDIndex shard ID/index sub-shard ID

1.2.2、所述操作日志2用于支持索引更新删除操作,具体流程参见3.2。 1.2.2. The operation log 2 is used to support index update and delete operations, see 3.2 for the specific process.

1.3、本发明通过元数据目录服务实现元数据的存储。本发明将系统中所需要的元数据都存放在元数据目录之上,由元数据目录保证元数据的安全与高可用性。元数据目录结构如图4所示。 1.3. The present invention realizes the storage of metadata through the metadata directory service. The invention stores all the metadata required in the system on the metadata directory, and the metadata directory ensures the security and high availability of the metadata. The metadata directory structure is shown in Figure 4.

1.3.1、所示的Index目录服务于索引集群,内部包含:Master,Node2shard,Shard2node,Live_nodes等目录。 1.3.1. The Index directory shown serves the index cluster, and contains: Master, Node2shard, Shard2node, Live_nodes and other directories.

a、所示的Master目录中保存当前索引主节点的IP地址以及备份索引主节点的IP地址。一旦一个新的索引主节点启动,判断该目录下是否已经存在索引主节点,如果没有则就将该节点的IP地址记入在该目录之下,标记为主节点。如果存在则监听该索引主节点的变化,如果该索引主节点失效,则将自己注册为新的索引主节点,对外提供服务。 a. The IP address of the current index master node and the IP address of the backup index master node are saved in the shown Master directory. Once a new index master node is started, it is judged whether there is already an index master node in the directory, and if not, the IP address of the node is recorded under the directory and marked as the master node. If it exists, it will monitor the changes of the index master node. If the index master node fails, it will register itself as a new index master node and provide external services.

b、所示的Live_nodes目录中保存当前处于正常工作的索引节点IP地址。 b. The indicated Live_nodes directory saves the IP address of the currently working index node.

c、所示的Node2shard目录保存各个正常索引节点中处理的索引分片名字。 c. The shown Node2shard directory saves the index shard names processed in each normal index node.

d、所示的Shard2node目录保存的是索引分片与索引节点的一一映射关系。 d. The shown Shard2node directory stores the one-to-one mapping relationship between index shards and index nodes.

1.3.2、所示的Search目录服务于查询集群,内部包含:Master,Node,Node2shard,Shard2node,Work,Definition等目录。 1.3.2. The Search directory shown in the figure serves the query cluster, and contains: Master, Node, Node2shard, Shard2node, Work, Definition and other directories.

a、所示的Master目录中保存当前查询主节点的IP地址以及备份查询主节点的IP地址。其过程和1.3.1中的a相同。 a. The IP address of the current query master node and the IP address of the backup query master node are stored in the shown Master directory. The process is the same as a in 1.3.1.

b、所示的Node2shard目录保存各个正常的查询节点包含的索引分片名字。 b. The shown Node2shard directory saves the names of the index shards contained in each normal query node.

c、所示的Shard2node目录保存索引分片与查询节点的一对多映射关系。 c. The shown Shard2node directory stores the one-to-many mapping relationship between index shards and query nodes.

d、所示的Node目录保存查询节点的元数据信息,以及各个节点的状态信息,如CPU占用率,内存空间等等。 d. The shown Node directory saves the metadata information of the query node, and the status information of each node, such as CPU usage, memory space and so on.

e、所示的Work目录保存查询主节点与查询节点操作消息。查询主节点和查询节点分别监听当前目录下的Master_queue和Node_queue目录。当索引节点成功上传、更新或者删除一个索引子分片之后,就会在该目录下的Master_queue节点上写入一个新的节点,该节点包含一个对应的操作消息,包括新增索引子分片,重载索引子分片,删除索引子分片等。查询主节点根据这些操作消息,生成查询节点操作消息,并将这些消息存储于Node_queue节点上。监听该节点的查询节点将会得到通知并执行相应的操作。 e. The shown Work directory saves the query master node and query node operation messages. The query master node and the query node listen to the Master_queue and Node_queue directories under the current directory respectively. When the index node successfully uploads, updates or deletes an index sub-shard, it will write a new node on the Master_queue node under the directory, which contains a corresponding operation message, including adding a new index sub-shard, Overload index subshards, delete index subshards, etc. The query master node generates query node operation messages based on these operation messages, and stores these messages on the Node_queue node. Query nodes listening to this node will be notified and act accordingly.

1.3.4、所述的Index_metadata目录存储索引的元数据信息,包括:索引的名字,索引文件存放的路径,索引文件复制的数目,归属于该索引的索引分片,部署该索引文件是否出错等信息。 1.3.4. The Index_metadata directory stores the metadata information of the index, including: the name of the index, the path where the index file is stored, the number of index file copies, the index fragments belonging to the index, whether there is an error in deploying the index file, etc. information.

1.3.5、所述的Version目录,主要保存该分布式全文索引系统的一些版本信息,用于验证,防止版本之间兼容性的问题。 1.3.5. The Version directory mainly stores some version information of the distributed full-text index system for verification and to prevent compatibility issues between versions.

1.3.6、所述的Definition目录,该目录保存用户索引任务定义。在系统正常运转的任何时候,用户都可以通过添加索引任务定义来实现对不同数据进行索引。具体而言,每一个索引任务在该目录下都有一个同名的节点,该节点中保存一个XML格式的索引任务定义文件序列化成二进制的数据。该文件中包含索引任务的名字,存储数据的数据库表名,索引分片策略名字,索引子分片的大小,索引子分片更新的时间等信息。同时还包括建索引的模式,目前支持批量式和增量式创建索引。系统根据索引任务定义执行索引操作。 1.3.6. The Definition directory, which saves user index task definitions. At any time when the system is running normally, users can index different data by adding index task definitions. Specifically, each indexing task has a node with the same name under the directory, and an indexing task definition file in XML format is stored in the node and serialized into binary data. This file contains information such as the name of the index task, the name of the database table that stores the data, the name of the index fragmentation strategy, the size of the index sub-shard, and the update time of the index sub-shard. At the same time, it also includes the index building mode, which currently supports batch and incremental index creation. The system performs indexing operations according to the indexing task definition.

2、本发明需要在各个节点上启动索引集群服务和查询集群服务,其中,索引集群服务包括索引主节点服务和索引节点服务,查询集群服务包括查询主节点服务和查询节点服务。 2. The present invention needs to start index cluster service and query cluster service on each node, wherein index cluster service includes index master node service and index node service, and query cluster service includes query master node service and query node service.

2.1、所述分布式全文索引系统启动过程包括以下几个步骤:首先,索引主节点和搜索主节点分别启动,进入安全模式,并分别扫描并监听元数据目录中索引节点和查询节点目录节点,以分别管理这些目录下的节点。其次,索引节点和查询节点启动,并将自身的信息注册到元数据目录之上,此时索引主节点和搜索主节点监听到消息,将新加入的节点纳入自身管理之中。最后,如果在安全模式下,节点不在发生变化,那么退出安全模式。至此完成了整个分布式全文索引系统启动的过程。 2.1. The start-up process of the distributed full-text indexing system includes the following steps: first, the index master node and the search master node start respectively, enter the security mode, and scan and monitor the index node and the query node directory node in the metadata directory respectively, To manage the nodes under these directories separately. Secondly, the index node and the query node start, and register their own information on the metadata directory. At this time, the index master node and the search master node listen to the message, and incorporate the newly added node into their own management. Finally, if the node is no longer changing while in safe mode, exit safe mode. So far, the process of starting the entire distributed full-text indexing system has been completed.

2.2、所述的索引主节点启动,需要经历以下过程(如图5所示):首先,判断是否处于初始化阶段,如果不是处于初始化阶段,启动初始化过程。其次,在元数据目录上创建的路径,包括Node2shard,Shard2node和Live_node目录。最后,在元数据目录中Definition目录上注册监听器,监听是否有新的索引任务生成,完成启动过程。 2.2. The start of the index master node needs to go through the following process (as shown in Figure 5): first, judge whether it is in the initialization phase, if not, start the initialization process. Second, the path created on the metadata directory, including the Node2shard, Shard2node, and Live_node directories. Finally, register a listener on the Definition directory in the metadata directory to monitor whether a new indexing task is generated to complete the startup process.

2.3、所述的索引节点启动需要经历以下几个过程(如图6所示):首先,初始化索引节点的信息,本地消息队列,以及启动各个索引处理器,需要启动删除和更新索引的线程以及相关消息队列,更新本地索引分片的信息,从HDFS上找到最新的索引子分片,并在该分片的目录上建立新的索引文件目录。其次,检查本地是否有一些旧的索引文件,如果存在则上传至HDFS上。最后针对不同的索引任务,初始化对应的索引器,用于建立索引。 2.3. The startup of the index node needs to go through the following processes (as shown in Figure 6): First, initialize the information of the index node, the local message queue, and start each index processor, and it is necessary to start the thread for deleting and updating the index and Relevant message queue, update the information of the local index shard, find the latest index sub-shard from HDFS, and create a new index file directory on the shard directory. Second, check whether there are some old index files locally, and upload them to HDFS if they exist. Finally, for different indexing tasks, initialize the corresponding indexer for indexing.

所述的索引处理器是建立、更新和删除索引的单元,通过调用索引器来实现。索引器可以采用常用的全文索引方法,如Lucene来实现。该方法应支持索引的建立,更新,删除以及合并操作。 The index processor is a unit for establishing, updating and deleting an index, which is realized by calling an indexer. The indexer can be implemented by using a commonly used full-text indexing method, such as Lucene. This method should support index creation, update, deletion, and merge operations.

2.4、所述的查询主节点启动过程包括(如图7所示):首先,启动查询节点选择策略,目的是根据查询选择出若干个节点列表,这些节点执行真正的查询操作。该策略可以采用轮询算法并结合节点负载信息实现。其次,启动查询节点信息管理器,用于统计查询节点的负载信息,服务于查询节点选择策略。最后,启动查询节点管理器,用于管理查询节点。 2.4. The start-up process of the query master node includes (as shown in Figure 7): firstly, start the query node selection strategy, the purpose is to select several node lists according to the query, and these nodes perform real query operations. This strategy can be realized by using polling algorithm combined with node load information. Secondly, start the query node information manager, which is used to count the load information of the query nodes and serve the query node selection strategy. Finally, start the query node manager for managing query nodes.

所述的启动查询管理器过程包括:首先判断该管理器是否处于关闭状态,如果处于关闭状态抛出异常。其次选择该节点是否能够成为主查询节点管理器,如果成为主节点,就注册该节点,并通知各个查询节点,启动查询节点管理过程。最后根据当前处于活跃状态的索引节点,发布监测各个查询节点上本地索引文件是否完整消息以及发布删除过期索引文件的信息。各个查询节点根据这些信息完成相应的操作。 The process of starting the query manager includes: first judging whether the manager is in a closed state, and throwing an exception if it is in a closed state. Secondly, it is selected whether the node can become the master query node manager. If it becomes the master node, the node is registered, and each query node is notified to start the query node management process. Finally, according to the index nodes that are currently active, publish the message of monitoring whether the local index files on each query node are complete or not, and release the information of deleting expired index files. Each query node completes the corresponding operation according to the information.

2.5、所述查询节点启动过程包括(如图8所示):首先,启动本地索引分片管理程序,管理本地已存在的索引分片。其次,启动查询节点监控器,监控查询节点的状态,包括:CPU时间,内存交换率,空内存的大小,物理内存的总大小,以及其他一些信息,并将这些信息记录在元数据目录中。再次,重新部署每一个已存在的索引分片,在每个索引分片上启动对应的查询服务。最后,启动查询节点消息队列,等待查询主节点的消息。 2.5. The start-up process of the query node includes (as shown in FIG. 8 ): firstly, start the local index slice management program to manage the existing local index slices. Second, start the query node monitor to monitor the status of the query node, including: CPU time, memory swap rate, size of empty memory, total size of physical memory, and other information, and record these information in the metadata directory. Again, redeploy each existing index shard, and start the corresponding query service on each index shard. Finally, start the query node message queue, waiting for the message of querying the master node.

3、本发明提出的高可用分布式全文索引方法,支持在全文数据上创建索引。本发明支持增量式创建索引和批量式创建索引,同时也支持对索引文件的更新与删除操作。建立索引之前,用户需要定义索引任务定义,并将该文件上传至元数据目录中。索引主节点监听到该目录节点发生变化,就会创建一个索引任务。该任务用于处理索引任务定义中的数据所对应的消息。 3. The highly available distributed full-text indexing method proposed by the present invention supports creating indexes on full-text data. The invention supports incremental index creation and batch index creation, and also supports update and delete operations on index files. Before creating an index, the user needs to define an index task definition and upload the file to the metadata directory. When the index master node detects that the directory node changes, it will create an index task. This task is used to process the messages corresponding to the data in the index task definition.

3.1、所述的增量式创建索引,需要用户在索引任务定义中将创建索引的模式设置为增量式模式。增量式创建索引的过程包括(如图9所示): 3.1. The incremental index creation described above requires the user to set the index creation mode to incremental mode in the index task definition. The process of incrementally creating an index includes (as shown in Figure 9):

3.1.1、当数据插入到存储系统中,触发增量建立索引的任务。索引主节点通过反射机制实例化索引任务定义中的索引分片策略,判定该数据的索引归属于哪一个索引分片。此后从元数据目录中读取索引分片与索引节点的映射关系,找到负责建立该索引分片的索引节点。最后将节点ID写入到消息中。 3.1.1. When data is inserted into the storage system, the task of incremental indexing is triggered. The index master node instantiates the index sharding strategy in the index task definition through the reflection mechanism, and determines which index shard the index of the data belongs to. Afterwards, the mapping relationship between the index fragment and the index node is read from the metadata directory, and the index node responsible for establishing the index fragment is found. Finally, write the node ID into the message.

3.1.2、索引主节点将3.1.1生成的消息通过远程调用的方式将该消息随机塞到任意一个索引节点的本地消息队列中。 3.1.2. The index master node randomly inserts the message generated in 3.1.1 into the local message queue of any index node through remote calling.

3.1.3索引节点读取对应的消息,如果该消息属于该节点,那么获取消息后的索引节点会根据消息中的数据主键从数据存储系统中读出数据,封装成索引单元。否则此消息不属于该节点,那么通过远程调用以及消息中的节点信息将该消息转发到对应索引节点。 3.1.3 The index node reads the corresponding message. If the message belongs to the node, the index node after obtaining the message will read the data from the data storage system according to the data primary key in the message and encapsulate it into an index unit. Otherwise, the message does not belong to the node, then the message is forwarded to the corresponding index node through the remote call and the node information in the message.

3.1.3、索引节点处理该消息。如果不存在与该消息对应索引处理器,则创建索引处理器,并根据索引任务定义实例化索引器。索引器读入索引单元,根据索引任务中的预定义索引域,对存储于索引单元中的数据进行索引。同时在操作日志1中记录索引分片ID与操作消息,并且在操作日志2中记录数据主键与对应的索引子分片的名字。 3.1.3. The index node processes the message. If there is no index processor corresponding to the message, create an index processor and instantiate the indexer according to the index task definition. The indexer reads the index unit, and indexes the data stored in the index unit according to the predefined index field in the index task. At the same time, record the index fragment ID and operation message in operation log 1, and record the data primary key and the name of the corresponding index sub-shard in operation log 2.

3.1.4、如果此时满足索引子分片文件上传的条件且此时该索引处理器中合并线程不在运行,那么停止当前的索引子分片文件上的索引器,新建一个文件目录作为新的索引器的索引目录,转3.1.3。上传索引文件线程并执行3.1.5。否则依然将索引建在本地的索引子分片目录之下,转3.1.3。 3.1.4. If the conditions for uploading the index sub-shard file are met at this time and the merge thread in the index processor is not running at this time, then stop the indexer on the current index sub-shard file and create a new file directory as a new The index directory of the indexer, go to 3.1.3. Upload the index file thread and execute 3.1.5. Otherwise, still build the index under the local index sub-shard directory, go to 3.1.3.

3.1.5、将旧的索引子分片文件重新命名为合并文件,设置索引正在合并的标志,并且在合并文件目录上启动一个索引文件合并线程,将索引文件合并。上传索引文件线程将合并的结果上传到分布式文件系统中的索引子分片文件目录。并且将新增索引子分片的操作消息插入到元数据目录中的Master_queue上。 3.1.5. Rename the old index sub-shard file to a merged file, set the flag that the index is being merged, and start an index file merge thread on the merged file directory to merge the index files. The upload index file thread uploads the merged result to the index sub-shard file directory in the distributed file system. And insert the operation message of the new index sub-shard into the Master_queue in the metadata directory.

3.1.6、如果上传成功,那么就删除与该索引分片对应的索引操作日志1,否则跳转至3.1.5重复上传索引分片的过程。 3.1.6. If the upload is successful, delete the index operation log 1 corresponding to the index fragment, otherwise skip to 3.1.5 and repeat the process of uploading the index fragment.

3.2、所述的更新索引的过程包括(如图10所示): 3.2. The process of updating the index includes (as shown in Figure 10):

3.2.1、更新数据的操作触发更新索引的任务。索引主节点根据索引分片策略判定该数据归属于哪一个索引分片,并从元数据目录上读取索引分片与索引节点的映射关系,找到对应的索引节点。 3.2.1. The operation of updating data triggers the task of updating the index. The index master node determines which index shard the data belongs to according to the index sharding policy, reads the mapping relationship between the index shard and the index node from the metadata directory, and finds the corresponding index node.

3.2.2、索引主节点通过远程调用将生成的更新索引消息传递给任意索引节点的本地消息队列。该索引节点从中读取对应的更新消息。如果该消息不属于当前节点,那么该节点根据消息中的节点信息将消息转发到真正的处理节点。 3.2.2. The index master node transmits the generated update index message to the local message queue of any index node through remote calls. The index node reads the corresponding update message from it. If the message does not belong to the current node, then the node forwards the message to the real processing node according to the node information in the message.

3.2.3、获取更新消息后的索引节点会根据消息中的信息,根据数据ID在该索引分片的操作日志2中查找对应的索引子分片。将索引子分片ID写入消息中。如果此时索引子分片在本地磁盘上,转步骤3.2.4。否则转3.2.5。 3.2.3. After obtaining the update message, the index node will search for the corresponding index sub-shard in the operation log 2 of the index slice according to the information in the message and the data ID. Write the index subshard ID into the message. If the index sub-shard is on the local disk at this time, go to step 3.2.4. Otherwise, go to 3.2.5.

3.2.4、根据该数据的文档主键,如果此时该数据的索引在本地的索引子分片之中,直接更新对应的索引。并在操作日志1中记录索引分片ID和对应的消息,转步骤3.2.2。 3.2.4. According to the document primary key of the data, if the index of the data is in the local index sub-shard at this time, directly update the corresponding index. And record the index fragment ID and the corresponding message in the operation log 1, go to step 3.2.2.

3.2.5、判定当前更新缓存队列中的消息数目是否到达阈值,如果没有到达则将该消息存入该队列,返回3.2.2。否则转步骤3.2.6。 3.2.5. Determine whether the number of messages in the current update cache queue reaches the threshold, if not, store the message in the queue, and return to 3.2.2. Otherwise, go to step 3.2.6.

3.2.6、将更新缓存队列中的消息全部交给处理队列,启动更新线程。更新线程处理每一个消息,根据每一个数据主键和索引子分片的对应关系,生成索引子分片与索引主键的一对多映射关系。此后,从分布式文件系统中将索引子分片下载本地磁盘。在该分片上实例化出索引处理器以及对应的索引器。根据消息中的数据主键从分布式列式数据库中读取数据,封装成索引单元并执行更新索引操作。成功之后在操作日志1中记录该索引子分片执行的更新操作。 3.2.6. Hand over all the messages in the update cache queue to the processing queue, and start the update thread. The update thread processes each message, and generates a one-to-many mapping relationship between index sub-shards and index primary keys according to the correspondence between each data primary key and index sub-shard. Thereafter, the index sub-shards are downloaded from the distributed file system to the local disk. Instantiate the index processor and the corresponding indexer on the shard. Read data from the distributed columnar database according to the data primary key in the message, encapsulate it into an index unit and perform an update index operation. After success, record the update operation performed by the index sub-shard in operation log 1.

3.2.7、当完成该索引子分片中所有更新操作,关闭在该目录上的索引器,并将更新目录中的索引文件上传至分布式索引子分片的目录。删除操作日志1中与该索引子分片相关的操作记录。同样的操作重复执行直至遍历完映射关系。 3.2.7. When all update operations in the index sub-shard are completed, close the indexer on the directory, and upload the index file in the update directory to the directory of the distributed index sub-shard. Delete the operation records related to the index sub-shard in operation log 1. The same operation is repeated until the mapping relationship is traversed.

3.3、所述删除索引过程和更新索引过程相同,不再复述。 3.3. The process of deleting an index is the same as that of updating an index, and will not be described again.

3.4、所述的批量式索引模式是当用户在索引任务定义中定义了批量式建立索引模式。此时,索引主节点将模式转换为批量式索引模式。批量式索引方法具体包含以下步骤(如图12所示): 3.4. The batch indexing mode mentioned is when the user defines a batch indexing mode in the indexing task definition. At this point, the index master node converts the mode to a batch index mode. The batch indexing method specifically includes the following steps (as shown in Figure 12):

3.4.1、调用MapReduce框架,在Map阶段调用索引分片策略,将数据划分为n个数据集合。然后将每个数据集合中的数据随机划分到若干个索引节点上。 3.4.1. Call the MapReduce framework, call the index fragmentation strategy in the Map stage, and divide the data into n data sets. Then randomly divide the data in each data set into several index nodes.

3.4.2、每个索引节点对划分的数据根据其所属的索引分片,分别建立索引子分片。每一个索引子分片按照大小划分。当索引子分片大小超过阈值,则创建新的索引子分片。 3.4.2. Each index node creates index sub-shards for the divided data according to the index shards it belongs to. Each index sub-shard is divided by size. When the size of the index sub-shard exceeds the threshold, a new index sub-shard is created.

3.4.3、在Reduce阶段,每个索引节点将自身中索引子分片文件合并到的对应的索引分片文件,将会生成n个索引分片文件。 3.4.3. In the Reduce phase, each index node merges its own index sub-shard files into the corresponding index shard files, and will generate n index shard files.

3.4.4、当完成批量式建索引任务之后,索引主节点在元数据目录下的Master_queue下写入载入索引分片的操作。查询主节点根据此操作通过节点选择策略将索引分片分配给若干个查询节点,并且在元数据目录下的Node_queue中写入载入索引分片的操作,各个对应的查询节点执行此操作,载入对应的索引。 3.4.4. After the batch index building task is completed, the index master node writes the operation of loading index fragments under the Master_queue in the metadata directory. According to this operation, the query master node assigns index fragments to several query nodes through the node selection strategy, and writes the operation of loading index fragments in the Node_queue under the metadata directory. Each corresponding query node performs this operation and loads into the corresponding index.

4、本发明所采用的方法还支持对索引的查询操作,查询流程如图11所示。查询步骤包括: 4. The method adopted in the present invention also supports query operations on indexes, and the query process is shown in FIG. 11 . The query steps include:

4.1、查询客户端根据查询内容生成分布式查询,对该查询进行解析,产生对应的解析结果。 4.1. The query client generates a distributed query based on the query content, analyzes the query, and generates the corresponding analysis result.

4.2、此后查询客户端利用4.1中产生的结果,调用本地的查询节点选择策略。该策略会远程调用查询主节点上的索引分片选择策略,根据元数据目录保存的查询节点与索引分片的信息,决定该查询属于哪些索引分片。由于一个索引分片有多个索引子分片,因此根据元数据目录中索引子分片与查询节点的映射关系,利用负载均衡技术从这些节点中选择负载最轻的查询节点,生成与该查询相对应的查询节点列表。最后,将该列表返回给查询客户端。 4.2. Afterwards, the query client uses the results generated in 4.1 to call the local query node selection strategy. This strategy will remotely invoke the index shard selection strategy on the query master node, and determine which index shards the query belongs to based on the information of the query node and index shards saved in the metadata directory. Since an index shard has multiple index sub-shards, according to the mapping relationship between index sub-shards and query nodes in the metadata directory, load balancing technology is used to select the query node with the lightest load from these nodes, and generate the same query The list of corresponding query nodes. Finally, the list is returned to the querying client.

4.3、查询客户端获取该查询节点列表,通过远程调用的方法,并行向这些查询节点发布查询请求。 4.3. The query client obtains the query node list, and issues query requests to these query nodes in parallel through the method of remote calling.

4.4、查询节点执行该查询请求,通过一个线程池在不同的索引分片之上查询对应的结果,将结果返回给查询客户端。 4.4. The query node executes the query request, queries the corresponding results on different index fragments through a thread pool, and returns the results to the query client.

4.5、客户端获取各个查询节点的查询结果之后,对查询结果进行合并操作,完成整个查询过程。 4.5. After the client obtains the query results of each query node, it merges the query results to complete the entire query process.

5、由于系统中各个节点是相互不可见的,需要提供一个高可靠性的消息通信系统保证各个流程的执行。该消息通信包括索引集群消息通信,索引集群和查询集群消息通信,查询集群消息通信。 5. Since each node in the system is invisible to each other, it is necessary to provide a highly reliable message communication system to ensure the execution of each process. The message communication includes index cluster message communication, index cluster and query cluster message communication, and query cluster message communication.

5.1、所述的索引集群消息通信主要发生在索引主节点和索引节点之间。消息主要包括以下集中类型:新建、更新、删除索引及模式切换消息。 5.1. The above-mentioned index cluster message communication mainly occurs between the index master node and the index node. Messages mainly include the following centralized types: new, update, delete index and mode switching messages.

    5.1.1、当处于增量式索引模式的时候,每当数据进入系统,索引主节点根据索引分片策略结合索引分片分布信息判定该数据属于的索引分片,在消息中记录该索引分片的信息,最后将该消息置于索引节点的消息队列之中。 5.1.1. When in the incremental index mode, whenever data enters the system, the index master node determines which index shard the data belongs to according to the index sharding strategy combined with the index shard distribution information, and records the index shard in the message. slice information, and finally put the message in the message queue of the index node.

5.1.2、当索引集群由增量式转为批量式状态时,索引主节点会在索引节点消息队列中加入模式切换消息。当索引节点获取这个消息,就会通知相关节点暂停当前的索引任务。此后系统进入批量索引模式。 5.1.2. When the index cluster changes from incremental to batch state, the index master node will add a mode switching message to the index node message queue. When the index node gets this message, it will notify the relevant nodes to suspend the current indexing task. The system then enters bulk indexing mode.

5.2、所述的索引与查询集群消息通信发生在:当索引集群对分布式文件系统中的索引文件进行新增,更新,删除以及合并操作的时候,需要通知查询集群中的各个相关查询节点更新本地的索引文件。当发生这些操作的时候,索引节点在查询主节点在元数据目录下的Master_queue插入一条操作消息,查询主节点会接收到通知,并处理该消息。二者之间消息的类型包括:检查,部署,新增,重新初始化,重新载入,删除索引和索引分片等。 5.2. The above-mentioned index and query cluster message communication occurs when: when the index cluster adds, updates, deletes and merges the index files in the distributed file system, it needs to notify each relevant query node in the query cluster to update local index file. When these operations occur, the index node inserts an operation message into the Master_queue of the query master node in the metadata directory, and the query master node will receive the notification and process the message. The types of messages between the two include: check, deploy, add, reinitialize, reload, delete index and index fragmentation, etc.

5.3、所述的查询集群消息通信主要是由索引与查询集群之间的消息通信引发的。当查询主节点获取一条新的消息,查询主节点就会对该消息进行解析,并生成多个查询节点消息,并且将该消息插入到元数据目录下的Node_queue中。查询节点接受到该消息,就会执行相应的任务。查询节点与主节点之间的消息类型包括:部署索引分片,载入索引分片,更新索引分片,删除索引分片等信息。 5.3. The query cluster message communication is mainly caused by the message communication between the index and the query cluster. When querying the master node to obtain a new message, the query master node will parse the message, generate multiple query node messages, and insert the message into the Node_queue under the metadata directory. When the query node receives the message, it will execute the corresponding task. The message types between the query node and the master node include: deploying index shards, loading index shards, updating index shards, deleting index shards and other information.

Claims (1)

1. a high-available distributed full-text index method, is characterized in that, the method comprises the following steps:
(1) start basic service system, comprise distributed file system, distributed column formula database and metadata catalog service; The index file that described distributed file system is set up for storing index node, simultaneously for the node in inquiry cluster provides index file; Described distributed column formula database is used for providing Operation Log service, the operations that storage is carried out, in addition, distributed column formula database is also for storing original full-text data file, distributed column formula database should support that metadata catalog service realizes the storage of metadata by row storage;
(2) on each node, start index cluster service and inquiry cluster service, wherein, index cluster services package is drawn together the service of index host node and index node service, and inquiry cluster services package is drawn together inquiry host node service and query node service; This step is specially: first, index host node and search host node start respectively, enter safe mode, and scan respectively and monitor index node and query node directory node in metadata catalog, to manage respectively the node under these catalogues; Secondly, index node and query node start, and the information registering of self is arrived on metadata node catalogue, and now index host node and search host node listen to message, include the node newly adding in self-management; Finally, if under safe mode, node no longer changes, and exits so safe mode; So far completed the process that whole distributed full-text index system starts;
(3) on full-text data, create index, upgrade index, delete index; Wherein, create index and comprise that increment type creates index and batch type creates index; This step realizes by following sub-step:
(3.1) described increment type creates index, and the pattern that needs user to create index in index task definition is set to increment type pattern; The process that increment type creates index comprises:
(3.1.1) when data are inserted in storage system, trigger increment and set up the task of index, index host node is by the index stripping strategy in reflex mechanism instantiation index task definition, which index burst the index of judging these data belongs to, after this mapping relations that read index burst and index node from metadata catalog, find the index node of being responsible for setting up this index burst; Finally node ID is written in message;
(3.1.2) message that index host node generates 3.1.1 is filled in this message in the local message queue of any one index node at random by the mode of far call;
(3.1.3) index node reads corresponding message, if this message belongs to this node, the index node obtaining so after message can be according to the data major key sense data from data-storage system in message, be packaged into indexing units, otherwise this message does not belong to this node, by the nodal information in far call and message, this message is forwarded to manipulative indexing node so;
(3.1.4) index node is processed this message, if there is no, with this message manipulative indexing processor, creates index processor, and according to index task definition instantiation index; Index reads in indexing units, according to the predefine index territory in index task, the data that are stored in indexing units are carried out to index, simultaneously recording indexes burst ID and operation information in Operation Log 1, and in Operation Log 2 name of record data major key and the corresponding sub-burst of index;
If (3.1.5) now meet the condition that the sub-slicing files of index uploads and now merge thread not in operation in this index processor, stop so the index on the sub-slicing files of current index, a newly-built file directory is as the index list of new index, go to step 3.1.3, and upload index file thread and perform step 3.1.6; Otherwise still index is built under the sub-burst catalogue of local index, gone to step 3.1.3;
(3.1.6) sub-old index slicing files is renamed as merged file, the mark that index is merging is set, and in merged file catalogue, start an index file merging thread, index file is merged; Upload index file thread the result of merging is uploaded to the sub-slicing files catalogue of index in distributed file system; And the operation information of the newly-increased sub-burst of index is inserted on the Master_queue in metadata catalog;
If (3.1.7) uploaded successfully, so delete the index operation daily record 1 corresponding with this index burst, otherwise jump to step 3.1.6 and repeat to upload the process of index burst;
(3.2) process of renewal index comprises:
(3.2.1) more the operation of new data triggers the task of upgrading index, index host node judges according to index stripping strategy this attribution data is in which index burst, and read the mapping relations of index burst and index node from metadata catalog, find corresponding index node;
(3.2.2) index host node passes to the renewal index messages of generation by far call the local message queue of any index node, this index node therefrom reads corresponding updating message, if this message does not belong to present node, this node is forwarded to real processing node according to the nodal information in message by message so;
(3.2.3) index node obtaining after updating message can be according to the information in message, in the Operation Log 2 of this index burst, search the sub-burst of corresponding index according to data ID, sub-index burst ID is write in message, if now the sub-burst of index, on local disk, goes to step 3.2.4; Otherwise go to step 3.2.5;
(3.2.4) according to the document major key of these data, if now the index of these data, among the sub-burst of local index, directly upgrades corresponding index; And in Operation Log 1 recording indexes burst ID and corresponding message, go to step 3.2.2;
(3.2.5) judge whether the message number in current renewal buffer queue arrives threshold value, if do not arrived, deposit this message in this queue, return to step 3.2.2; Otherwise go to step 3.2.6;
(3.2.6) all give processing queue by the message of upgrading in buffer queue, start more new thread, upgrade each message of thread process, according to the corresponding relation of each data major key and the sub-burst of index, the one-to-many mapping relations of the sub-burst of generating indexes and index major key, after this, from distributed file system, sub-index burst is downloaded to local disk, on this burst, example dissolves index processor and corresponding index, according to the reading out data from distributed column formula database of the data major key in message, be packaged into indexing units and carry out and upgrade index operation, after success, in Operation Log 1, record the renewal operation that the sub-burst of this index is carried out,
(3.2.7) when completing all renewals operation in the sub-burst of this index, be closed in the index in this catalogue, and the index file in new directory be more uploaded to the catalogue of the sub-burst of distributed index; The operation note relevant to the sub-burst of this index in deletion action daily record 1, same operation repeats until traveled through mapping relations;
(3.3) process of deletion index comprises:
(3.3.1) operation of deleting data triggers the task of deleting index, index host node judges according to index stripping strategy this attribution data is in which index burst, and read the mapping relations of index burst and index node from metadata catalog, find corresponding index node;
(3.3.2) index host node passes to the deletion index messages of generation by far call the local message queue of any index node, this index node therefrom reads corresponding deletion message, if this message does not belong to present node, this node is forwarded to real processing node according to the nodal information in message by message so;
(3.3.3) obtaining the index node of deleting after message can be according to the information in message, in the Operation Log 2 of this index burst, search the sub-burst of corresponding index according to data ID, sub-index burst ID is write in message, if now the sub-burst of index, on local disk, goes to step 3.3.4; Otherwise go to step 3.3.5;
(3.3.4) according to the document major key of these data, if now the index of these data, among the sub-burst of local index, is directly deleted corresponding index; And in Operation Log 1 recording indexes burst ID and corresponding message, go to step 3.3.2;
(3.3.5) judge whether the message number in current deletion buffer queue arrives threshold value, if do not arrived, deposit this message in this queue, return to step 3.3.2; Otherwise go to step 3.3.6;
(3.3.6) all give processing queue by the message of deleting in buffer queue, start and delete thread, delete each message of thread process, according to the corresponding relation of each data major key and the sub-burst of index, the one-to-many mapping relations of the sub-burst of generating indexes and index major key, after this, from distributed file system, sub-index burst is downloaded to local disk, on this burst, example dissolves index processor and corresponding index, according to the reading out data from distributed column formula database of the data major key in message, be packaged into indexing units and carry out and delete index operation, after success, in Operation Log 1, record the deletion action that the sub-burst of this index is carried out,
(3.3.7) when completing all deletion actions in the sub-burst of this index, be closed in the index in this catalogue, and the index file in deltreeing be uploaded to the catalogue of the sub-burst of distributed index; The operation note relevant to the sub-burst of this index in deletion action daily record 1, same operation repeats until traveled through mapping relations;
(3.4) described batch type indexing model is to set up indexing model when user has defined batch type in index task definition, and now, pattern is converted to batch type indexing model by index host node, and batch type indexing means specifically comprises following steps:
(3.4.1) call MapReduce framework, call index stripping strategy in the Map stage, data are divided into n data acquisition; Then by the data random division in each data acquisition to several index nodes;
(3.4.2) each index node, to the data of dividing according to the index burst under it, is set up respectively the sub-burst of index, and the sub-burst of each index is divided according to size, when the sub-burst size of index exceedes threshold value, creates the sub-burst of new index;
(3.4.3), in the Reduce stage, the corresponding index slicing files that each index node merges to sub-index in self slicing files, will generate n index slicing files;
(3.4.4) when completing after batch type indexes task, index host node writes the operation that is written into index burst under the Master_queue under metadata catalog; Inquiry host node is distributed to several query node by node selection strategy by index burst according to this operation, and in the Node_queue under metadata catalog, write the operation that is written into index burst, each corresponding query node is carried out this operation, is written into corresponding index;
(4) search index, comprises following sub-step:
(4.1) inquiring client terminal generates distributed query according to query contents, and this inquiry is resolved, and produces corresponding analysis result;
(4.2) after this inquiring client terminal utilizes the result producing in step 4.1, calls local query node selection strategy; This strategy can be inquired about the index burst selection strategy on host node by far call, the query node of preserving according to metadata catalog and the information of index burst, determine which index burst this inquiry belongs to, because an index burst has the sub-burst of multiple indexes, therefore according to the mapping relations of the sub-burst of index in metadata catalog and query node, utilize load-balancing technique from these nodes, to select the lightest query node of load, generate the query node list corresponding with this inquiry; Finally, this list is returned to inquiring client terminal;
(4.3) inquiring client terminal obtains this query node list, by the method for far call, walks abreast to these query node releasing inquiry requests;
(4.4) query node is carried out this inquiry request, inquires about corresponding result by a thread pool on different index bursts, and result is returned to inquiring client terminal;
(4.5) after client is obtained the Query Result of each query node, Query Result is carried out to union operation, complete whole query script.
CN201210226357.2A 2012-06-29 2012-06-29 High-availability distribution type full-text index method Expired - Fee Related CN102779185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210226357.2A CN102779185B (en) 2012-06-29 2012-06-29 High-availability distribution type full-text index method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210226357.2A CN102779185B (en) 2012-06-29 2012-06-29 High-availability distribution type full-text index method

Publications (2)

Publication Number Publication Date
CN102779185A CN102779185A (en) 2012-11-14
CN102779185B true CN102779185B (en) 2014-11-12

Family

ID=47124097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210226357.2A Expired - Fee Related CN102779185B (en) 2012-06-29 2012-06-29 High-availability distribution type full-text index method

Country Status (1)

Country Link
CN (1) CN102779185B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776810A (en) * 2016-11-24 2017-05-31 广东数果科技有限公司 The data handling system and method for a kind of big data
CN108694209A (en) * 2017-04-11 2018-10-23 华为技术有限公司 Object-based distributed index method and client

Families Citing this family (44)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067525B (en) * 2013-01-18 2015-11-25 广东工业大学 A kind of cloud storing data backup method of feature based code
CN104063376A (en) * 2013-03-18 2014-09-24 阿里巴巴集团控股有限公司 Multi-dimensional grouping operation method and system
CN103310023A (en) * 2013-07-05 2013-09-18 深圳中兴网信科技有限公司 Distributed searching system and method
CN103488687A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Searching system and searching method of big data
CN104572785B (en) * 2013-10-29 2018-07-03 阿里巴巴集团控股有限公司 A kind of distributed method and apparatus for creating index
WO2015074382A1 (en) * 2013-11-19 2015-05-28 Huawei Technologies Co., Ltd. Method for optimizing index, master database node and subscriber database node
CN103678577B (en) * 2013-12-10 2017-10-24 新浪网技术(中国)有限公司 A kind of data-updating method and device
CN103731369A (en) * 2013-12-27 2014-04-16 乐视网信息技术(北京)股份有限公司 Method and system for updating data queue in server
CN104281648B (en) * 2014-05-12 2017-05-10 浙江大学 Search-result multi-dimensional navigating method on basis of dimension label
CN104199963A (en) * 2014-09-19 2014-12-10 浪潮(北京)电子信息产业有限公司 Method and device for HBase data backup and recovery
CN104881466B (en) * 2015-05-25 2018-09-07 百度在线网络技术(北京)有限公司 The processing of data fragmentation and the delet method of garbage files and device
CN106326243B (en) * 2015-06-19 2020-02-21 苏宁云计算有限公司 Data processing method and device
CN105447097A (en) * 2015-11-10 2016-03-30 北京北信源软件股份有限公司 Data acquisition method and system
CN105740472A (en) * 2016-03-14 2016-07-06 中国科学院计算技术研究所 Distributed real-time full-text search method and system
CN107220249B (en) * 2016-03-21 2020-11-10 伊姆西Ip控股有限责任公司 Classification-based full-text search
CN106776702B (en) * 2016-11-11 2021-03-05 北京奇虎科技有限公司 Method and device for processing indexes in master-slave database system
CN107402806B (en) * 2017-04-20 2020-08-18 阿里巴巴集团控股有限公司 Task processing method and device of distributed file architecture
CN107220287A (en) * 2017-04-24 2017-09-29 东软集团股份有限公司 For the index managing method of log query, device, storage medium and equipment
CN107273462B (en) * 2017-06-02 2020-09-25 浪潮云信息技术股份公司 Full-text index method for building HBase cluster, data reading method and data writing method
CN107491487B (en) * 2017-07-17 2020-12-04 中国科学院信息工程研究所 A full-text database architecture and bitmap index creation, data query method, server and medium
CN110019498B (en) * 2017-08-14 2022-04-12 北京京东尚科信息技术有限公司 Log synchronization method and device, storage medium and electronic equipment
CN108460072A (en) * 2017-12-26 2018-08-28 北京国电通网络技术有限公司 With electricity consumption data retrieval method and system
CN108491549B (en) * 2018-04-09 2022-02-01 深圳市茁壮网络股份有限公司 Method and device for creating file directory in distributed storage system
CN108629026A (en) * 2018-05-09 2018-10-09 上海达梦数据库有限公司 A kind of update method of full-text index, device, equipment and storage medium
CN108681592B (en) * 2018-05-15 2021-05-25 北京三快在线科技有限公司 Index switching method, device and system and index switching central control device
CN110502460B (en) * 2018-05-16 2021-03-23 华为技术有限公司 Data processing method and node
CN110928839B (en) * 2018-08-31 2023-05-12 携程旅游网络技术(上海)有限公司 International freight rate data storage method and system
CN110781135B (en) * 2019-09-20 2023-05-30 北京三快在线科技有限公司 Distributed search system, index distribution method, and storage medium
CN110990366B (en) * 2019-12-04 2024-02-23 中国农业银行股份有限公司 Index allocation method and device for improving performance of ES-based log system
CN111078153B (en) * 2019-12-20 2023-08-01 同方知网数字出版技术股份有限公司 A File-Based Distributed Storage Method
CN111259082B (en) * 2020-02-11 2023-07-21 深圳市六因科技有限公司 A method to realize full data synchronization in a big data environment
CN111752946B (en) * 2020-06-22 2021-04-30 上海众言网络科技有限公司 Method and device for preprocessing research data based on fragmentation mode
CN111899885A (en) * 2020-06-28 2020-11-06 万达信息股份有限公司 Distributed personnel event index implementation method and system
CN111737018B (en) * 2020-08-26 2020-12-22 腾讯科技(深圳)有限公司 ZooKeeper configuration file storage processing method, device, equipment and medium thereof
CN112181950B (en) * 2020-10-19 2024-03-26 北京米连科技有限公司 Construction method of distributed object database
CN112100160B (en) * 2020-11-05 2021-09-07 四川新网银行股份有限公司 Elastic Search based double-activity real-time data warehouse construction method
CN112632083B (en) * 2020-12-31 2024-07-09 中国农业银行股份有限公司 Method, device and equipment for realizing index data updating
CN112685419B (en) * 2020-12-31 2021-09-10 北京赛思信安技术股份有限公司 Distributed efficient parallel loading method capable of keeping consistency of janusGraph data
CN113535730A (en) * 2021-07-21 2021-10-22 挂号网(杭州)科技有限公司 Index updating method and system for search engine, electronic equipment and storage medium
CN113779349A (en) * 2021-08-11 2021-12-10 中央广播电视总台 Data retrieval system, apparatus, electronic device, and readable storage medium
CN113868249A (en) * 2021-09-23 2021-12-31 广东电网有限责任公司 Data storage method and device, computer equipment and storage medium
CN115051981B (en) * 2022-05-12 2024-08-06 中国农业银行股份有限公司 Zookeeper-based asynchronous downloading method and device
CN115203159B (en) * 2022-07-25 2024-06-04 北京字跳网络技术有限公司 Data storage method, device, computer equipment and storage medium
CN117349321B (en) * 2023-12-04 2024-03-05 凯美瑞德(苏州)信息科技股份有限公司 Multi-table connection query method and device for document database

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008021748A2 (en) * 2006-08-07 2008-02-21 Bea Systems, Inc. Distributed index search
CN102004778A (en) * 2010-11-19 2011-04-06 清华大学 Text index online updating method in cloud environment
CN102169507A (en) * 2011-05-26 2011-08-31 厦门雅迅网络股份有限公司 Distributed real-time search engine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7725470B2 (en) * 2006-08-07 2010-05-25 Bea Systems, Inc. Distributed query search using partition nodes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008021748A2 (en) * 2006-08-07 2008-02-21 Bea Systems, Inc. Distributed index search
CN102004778A (en) * 2010-11-19 2011-04-06 清华大学 Text index online updating method in cloud environment
CN102169507A (en) * 2011-05-26 2011-08-31 厦门雅迅网络股份有限公司 Distributed real-time search engine

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776810A (en) * 2016-11-24 2017-05-31 广东数果科技有限公司 The data handling system and method for a kind of big data
CN106776810B (en) * 2016-11-24 2020-10-16 广东数果科技有限公司 Big data processing system and method
CN108694209A (en) * 2017-04-11 2018-10-23 华为技术有限公司 Object-based distributed index method and client
CN108694209B (en) * 2017-04-11 2021-11-19 华为技术有限公司 Distributed index method based on object and client

Also Published As

Publication number Publication date
CN102779185A (en) 2012-11-14

Similar Documents

Publication Publication Date Title
CN102779185B (en) High-availability distribution type full-text index method
US11809726B2 (en) Distributed storage method and device
EP3811596B1 (en) Hierarchical namespace with strong consistency and horizontal scalability
CN111078121B (en) Data migration method and system for distributed storage system and related components
US10831720B2 (en) Cloud storage distributed file system
US10853242B2 (en) Deduplication and garbage collection across logical databases
JP6346937B2 (en) Database system with database engine and separate distributed storage service
US9558194B1 (en) Scalable object store
JP6196368B2 (en) Avoiding system-wide checkpoints in distributed database systems
US8990243B2 (en) Determining data location in a distributed data store
JP2021002369A (en) Index update pipeline
US11080253B1 (en) Dynamic splitting of contentious index data pages
US11297031B2 (en) Hierarchical namespace service with distributed name resolution caching and synchronization
US10922303B1 (en) Early detection of corrupt data partition exports
CN105493474B (en) System and method for supporting partition level logging for synchronizing data in a distributed data grid
JP2016515271A (en) Fast crash recovery for distributed database systems
JP2016524750A5 (en)
Dwivedi et al. Analytical review on Hadoop Distributed file system
US10558373B1 (en) Scalable index store
KR20130038517A (en) System and method for managing data using distributed containers
Leibert et al. Automatic management of partitioned, replicated search services
US11853177B2 (en) Global entity distribution
CN115687250A (en) A storage method, device, system and computer storage medium
US20250110928A1 (en) Data processing method and related apparatus
CN110134662A (en) SDN distributed storage system, data processing method and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20141112

Termination date: 20200629