WO2015188501A1 - 配置文件更新方法、装置及系统和计算机存储介质 - Google Patents

配置文件更新方法、装置及系统和计算机存储介质 Download PDF

Info

Publication number
WO2015188501A1
WO2015188501A1 PCT/CN2014/086989 CN2014086989W WO2015188501A1 WO 2015188501 A1 WO2015188501 A1 WO 2015188501A1 CN 2014086989 W CN2014086989 W CN 2014086989W WO 2015188501 A1 WO2015188501 A1 WO 2015188501A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration file
new configuration
zookeeper
slave node
master node
Prior art date
Application number
PCT/CN2014/086989
Other languages
English (en)
French (fr)
Inventor
刘勇
陆小慧
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015188501A1 publication Critical patent/WO2015188501A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • the present invention relates to a configuration file update technology in the communication field, and in particular, to a configuration file update method, apparatus and system, and computer storage medium based on a zookeeper distributed search engine system. .
  • Figure 1 shows a distributed time search engine system.
  • the distributed search engine system is usually managed by zookeeper.
  • the distributed search engine system includes a master master node and a slave slave node.
  • the master node and the slave node have multiple search tasks under normal operation conditions, and the search task can be customized according to the business scenario of the upper layer application.
  • the slave node described in FIG. 1 includes a slave node 1 and a slave node 2.
  • the search task of the master node has a configuration file for collecting data requirements.
  • the search task collects the data of the upper application requirements by changing these configuration files, and then performs index processing to generate an index file, and provides a search service through the retrieval interface.
  • the search task of the slave node does not have the above configuration file.
  • the method for the slave node to obtain the above configuration file is:
  • the configuration file on the master node needs to be uploaded to the zookeeper first;
  • the slave node gets the configuration file from zookeeper and loads it into memory.
  • the slave node After the configuration file is successfully loaded, the slave node is indexed by the upper layer by using the corresponding search task, and the index file is also generated by the upper layer, and the search service is provided through the retrieval interface; thereby implementing distributed processing of the search task. .
  • the configuration file under the search task of the search engine system master node needs to be updated accordingly.
  • the configuration file in the master node is updated, it is To synchronize the configuration file between the slave node and the master node, the administrator manually restarts the master node, so that the master node uploads the configuration file to the zookeeper.
  • FIG. 2 is a schematic diagram of a method for synchronizing configuration files between a master node and a slave node in the prior art.
  • Step S1 The master node starts uploading the configuration file to the zookeeper when restarting;
  • Step S2 The slave node starts to read the configuration file stored in the zookeeper when restarting.
  • the master node After the master node is updated, it needs to be manually triggered by the administrator to upload the updated configuration file to the zookeeper.
  • the slave node also needs to be manually triggered by the administrator to restart the Zookeeper.
  • the configuration file is loaded into the memory; whether it is the master node or the slave node restarts, it takes a few minutes to resume normal operation, which affects efficiency.
  • embodiments of the present invention are directed to a configuration file update method, apparatus, and computer storage medium based on a zookeeper distributed search engine system, to automatically implement a configuration file between a configuration file of a real slave node and a master node. Synchronize and improve the efficiency of configuration file synchronization between the master node and the slave node.
  • a first aspect of the embodiments of the present invention provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • the new configuration file is sent to the zookeeper
  • the new configuration file is used to be sent to the slave node by the zookeeper.
  • the detecting whether the master node forms a new configuration file is:
  • the detecting the update time of the configuration file of the master node is:
  • the update time of the configuration file of the master node is detected periodically or in real time by a script process running in the master node.
  • a method for updating a configuration file based on a zookeeper distributed search engine system includes:
  • the new configuration file is used to replace the old configuration file in the slave node, and is loaded into the slave node memory for processing of the search task.
  • the method further includes:
  • the loading notification is used to trigger the slave node to load into the memory of the slave node after receiving the new configuration file.
  • a third aspect of the embodiments of the present invention provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • the method further includes:
  • the loading of the new configuration file to replace the old configuration file into memory is:
  • the new configuration file is replaced with the old replacement file into the memory under the trigger of the loading notification.
  • a fourth aspect of the embodiments of the present invention provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • the master node detects whether the master node has formed a new configuration file
  • the master node When it is determined that a new configuration file is formed, the master node sends the new configuration file to the zookeeper;
  • the zookeeper receives and stores the new configuration file
  • the zookeeper sends the new configuration file to the slave node
  • the slave node receives the new configuration file
  • the slave node loads the new configuration file with the old replacement file into memory.
  • the method further includes:
  • the zookeeper also sends a loading notification to the slave node
  • the slave node receives the loading notification
  • the slave node loads the new configuration file as:
  • the slave node loads the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • a fifth aspect of the embodiments of the present invention provides a configuration file updating apparatus based on a zookeeper distributed search engine system, where the apparatus is a master node; wherein the master node includes:
  • a detecting unit configured to detect whether a new configuration file is formed by the master node
  • a first sending unit configured to send the new configuration file to the zookeeper when it is determined that a new configuration file is formed
  • the new configuration file is used to be sent to the slave node by the zookeeper.
  • the detecting unit comprises:
  • a recording module configured to obtain an update time of a previous configuration file
  • a detecting module configured to detect an update time of a configuration file of the master node
  • Determining a module configured to determine when the detection result indicates that the update time has changed Whether a new configuration file has been formed.
  • the detecting module is configured to detect an update time of the configuration file of the master node periodically or in real time by a script process running in the master node.
  • a sixth aspect of the embodiments of the present invention provides a configuration file update apparatus based on a zookeeper distributed search engine system, where the apparatus is a zookeeper; the zookeeper includes:
  • a first receiving unit configured to receive a new configuration file sent by the master node
  • a storage unit configured to store the new configuration file
  • a second sending unit configured to send the new configuration file to the slave node
  • the new configuration file is used to replace the old configuration file in the slave node, and is loaded into the slave node memory for processing of the search task.
  • the zookeeper further includes:
  • the second sending unit is further configured to send a loading notification to the slave node
  • the loading notification is used to trigger the slave node to load into the memory of the slave node after receiving the new configuration file.
  • a seventh aspect of the embodiments of the present invention provides a profile update device based on a zookeeper distributed search engine system, where the device is a slave node, and the slave node includes:
  • a second receiving unit configured to receive a new configuration file sent by the zookeeper
  • a load unit configured to load the new configuration file into the memory by replacing the old configuration file.
  • the second receiving unit is further configured to receive a loading notification sent by the zookeeper;
  • the loading unit is configured to load the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • An eighth aspect of the embodiments of the present invention provides a configuration file update system based on a zookeeper distributed search engine system, where the system includes:
  • the master node is configured to detect whether the master node has formed a new configuration file, and when The new configuration file is sent to the zookeeper when it is determined that a new configuration file is formed;
  • a zookeeper configured to receive and store the new configuration file and send the new configuration file to a slave node
  • a slave node configured to receive the new configuration file and load the new configuration file to replace the old replacement file into the memory.
  • the zookeeper is further configured to send a loading notification to the slave node;
  • the slave node is further configured to receive the loading notification
  • the slave node is configured to load the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • a ninth aspect of the present invention provides a computer storage medium, where the computer storage medium stores computer executable instructions, and the computer executable instructions are configured as the method according to the first to fourth aspects of the embodiments of the present invention. At least one of them.
  • the configuration file updating method, device and system based on the ZooKeeper distributed search engine system and the computer storage medium actively detect whether the configuration file in the master node is updated, and if the update forms a new configuration file. Actively sent to the zookeeper for providing the configuration file update source for the slave node; no need to wait until the master node restarts after the administrator triggers to send the new configuration file to the zookeeper; thus improving the synchronization timeliness, new The sending of the configuration file is no longer accompanied by the restart of the master node, thereby the cost of sending the new configuration file to the zookeeper.
  • FIG. 1 is a schematic structural diagram of a search engine system in a distributed time
  • FIG. 2 is a schematic flowchart of a synchronization method of an existing configuration file
  • FIG. 3 is a schematic flowchart of a method for updating a configuration file based on a zookeeper distributed search engine system according to an embodiment of the present invention
  • step S110 in FIG. 3 is a schematic flowchart of step S110 in FIG. 3 according to an embodiment of the present invention.
  • FIG. 5 is a second schematic flowchart of a method for updating a configuration file based on a zookeeper distributed search engine system according to an embodiment of the present invention
  • FIG. 6 is a third schematic flowchart of a method for updating a configuration file based on a zookeeper distributed search engine system according to an embodiment of the present invention
  • FIG. 7 is a fourth schematic flowchart of a method for updating a configuration file based on a zookeeper distributed search engine system according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of a master node according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a detecting unit according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a zookeeper according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a slave node according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a configuration file update system based on a zookeeper distributed search engine system according to an embodiment of the present invention.
  • this embodiment provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • Step S110 detecting whether a new configuration file is formed by the master node
  • Step S120 When it is determined that a new configuration file is formed, the new configuration file is sent to the zookeeper;
  • the new configuration file is used to be sent to the slave node by the zookeeper.
  • the steps described in this embodiment are mainly applied to the master node, and the master node automatically detects that the internal configuration file has been updated to form a new configuration file; if a new configuration file is formed, it will be actively pushed to the zookeeper. You don't have to wait until the manager triggers a reboot before sending it to zookeeper. Obviously the master node doesn't need to stop in order to send a new configuration file. At hand, after restarting, the new configuration file is sent, and the configuration file is sent directly; obviously, the operation of sending a new configuration file by the master is simpler and more efficient; and the configuration file between the master node and the slave node is lowered. Synchronization costs.
  • the step S110 is preferably:
  • Step S111 Acquire an update time of the previous configuration file
  • Step S112 detecting an update time of the configuration file of the master node
  • Step S113 When the detection result indicates that the update time has changed, it is determined whether a new configuration file is formed.
  • the last update of the configuration file is 10:25 on May 23, 2014;
  • the test is updated at 12:25 on May 28, 2014;
  • the master node can know that the configuration file is updated at this time, and a new configuration file is formed and sent to the zookeeper.
  • the master node may form a backup configuration file by using a backup; the backup configuration file is periodically used by the master node.
  • the current configuration file is compared; if the current configuration file is different from the backup configuration file, it is also considered that a new configuration file is formed; the new configuration file is sent to the zookeeper, and the new configuration file is stored as the current backup file.
  • the update time of the configuration file of the master node is detected periodically or in real time by a script process running in the master node.
  • the script process is used to monitor the update time in a timely or real-time manner, which is simple and timely. It is found that a new configuration file is formed, so that the delay is small and efficient.
  • the foregoing embodiment provides a configuration file update method based on the ZooKeeper distributed search engine system, which is applied to the master node, and automatically detects whether a new configuration file is formed in the master node, and detects that a new configuration file is formed.
  • the administrator does not need to restart the master node to upload the new configuration file after discovering that the master node has formed a new configuration file, which obviously reduces the cumbersome configuration file synchronization between the master node and the slave node.
  • Sexuality increases the intelligence of the device and reduces the cost of synchronization.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • this embodiment provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • Step S210 Receive and store a new configuration file sent by the master node.
  • Step S220 Send the new configuration file to the slave node
  • the new configuration file is used to replace the old configuration file in the slave node, and is loaded into the slave node memory for processing of the search task.
  • the method described in this embodiment is a method applied to the zookeeper side, where the zookeeper is a management structure of the master node and the slave node, and may correspond to different physical devices of the master node and/or the slave node, or may correspond to The same physical device.
  • the zookeeper actively sends the received configuration file to the slave node instead of passively waiting for the slave node to request retransmission, thereby making the synchronization more timely.
  • the zookeeper after receiving the new configuration file, the zookeeper sends a download notification to the slave node, and sends an instruction to the zookeeper based on the download notification after receiving the slave node; The zookeeper sends the new configuration file to the slave node upon receiving the send command. Therefore, after receiving the download notification, the slave node actively acquires the new configuration file from the zookeeper.
  • the method further includes:
  • the loading notification is used to trigger the slave node to load into the memory of the slave node after receiving the new configuration file.
  • the zookeeper not only actively sends a new configuration file to the slave node, but also sends a loading notification to the slave node; in a specific implementation process, the loading notification may be combined with the new configuration file. Send, thereby reducing the number of information interactions with the slave nodes; or sending them separately, there are many specific implementations, and there is no limit here.
  • the embodiment provides a method for the zookeeper to actively push a new configuration file to the slave node, instead of being acquired by the slave node when restarting, and sending the loading notification to enable the slave node to load the new configuration file in time. It is easy to synchronize between the master node and the slave node. The slave node does not need to be restarted, and the manager does not need to manually trigger the restart of the slave node.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • this embodiment provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • Step S310 Receive a new configuration file sent by the zookeeper
  • Step S320 Load the new configuration file to replace the old configuration file into the memory.
  • the method described in this embodiment is mainly applied to a slave node, and the slave node does not actively acquire the configuration file in the zookeeper during the restart, but receives the file actively sent by the zookeeper, and actively receives the new configuration file after receiving the new configuration file.
  • Replacing the new configuration file, synchronizing with the configuration file of the master node does not require restarting, which reduces the synchronization cost and improves the synchronization efficiency.
  • the method further includes:
  • the step S320 is specifically: loading the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • the slave node Through the receipt of the load notification, the slave node knows when to load the new configuration file into memory, which is quick and easy.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • this embodiment provides a configuration file update method based on a zookeeper distributed search engine system, where the method includes:
  • Step S410 The master node detects whether a new configuration file is formed by the master node.
  • Step S420 When it is determined that a new configuration file is formed, the master node sends the new configuration file to the zookeeper;
  • Step S430 The zookeeper receives and stores the new configuration file.
  • Step S440 The zookeeper sends the new configuration file to the slave node.
  • Step S450 The slave node receives the new configuration file.
  • Step S460 The slave node loads the new configuration file to replace the old replacement file into the memory.
  • the method further includes:
  • the zookeeper also sends a loading notification to the slave node
  • the slave node receives the loading notification
  • the step S460 is:
  • the slave node loads the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • the steps performed by the master node in this embodiment refer to the first embodiment.
  • the steps performed by the zookeeper refer to the second embodiment.
  • the steps performed by the slave node refer to the embodiment.
  • the method provided in this embodiment does not require the administrator to manually restart the master node and the slave node to synchronize between the slave node and the master node, so that the operation is simple, and neither the slave node nor the master node need to stop.
  • the processed task can be synchronized to restart, which reduces the synchronization cost and improves the Synchronization efficiency.
  • Embodiment 5 is a diagrammatic representation of Embodiment 5:
  • the embodiment provides a profile update device based on a zookeeper distributed search engine system, where the device is a master node; the master node includes:
  • the detecting unit 110 is configured to detect whether a new configuration file is formed by the master node
  • the first sending unit 120 is configured to send the new configuration file to the zookeeper when it is determined that a new configuration file is formed;
  • the new configuration file is used to be sent to the slave node by the zookeeper.
  • the specific structure of the detecting unit 110 may include a processor and a storage medium; the storage medium stores computer readable instructions; the processor reads the readable instruction through a communication interface inside a master node such as a bus, and Executing the readable instructions can complete the function of detecting whether the master node has formed a new configuration file.
  • the processor can include a processor having processing functionality, such as a central processing unit, a microprocessor, a digital signal processor, or a programmable logic array.
  • processing functionality such as a central processing unit, a microprocessor, a digital signal processor, or a programmable logic array.
  • the specific structure of the first sending unit 120 may include a communication interface; the communication interface may include a wired communication interface and a wireless communication interface, such as a RJ45; a transceiver antenna.
  • the detecting unit 110 includes:
  • the recording module 111 is configured to obtain an update time of the previous configuration file
  • the detecting module 112 is configured to detect an update time of the configuration file of the master node
  • the determining module 113 is configured to determine whether a new configuration file is formed when the detection result indicates that the update time has changed.
  • the specific structure of the recording module 111 may include a storage medium, and store an update time of the previous configuration file
  • the specific structure of the detecting module 112 may include a timer and a comparator or a processor configured to record the update time of the latest configuration file; the comparator is configured to be the most The update time of the configuration file is compared with the update time recorded in the recording module 111 to form a comparison result.
  • the determining module 113 determines whether a new configuration file is formed according to the comparison result, and the specific structure may be a processor or a logic circuit or the like.
  • the detecting module 112 is configured to detect an update time of a configuration file of the master node periodically or in real time by a script process running in the master node.
  • the detection module 112 is preferably a processor running a script process.
  • the master node described in the foregoing embodiment provides the hardware support for the method described in the first embodiment, and can be used to implement the method in any one of the first embodiment.
  • the same method reduces the relationship between the master node and the slave node. The cumbersomeness of configuration file synchronization, the intelligence of the device is improved, and the synchronization cost is reduced.
  • the embodiment provides a configuration file update device based on a zookeeper distributed search engine system, where the device is a zookeeper; the zookeeper includes:
  • the first receiving unit 210 is configured to receive a new configuration file sent by the master node
  • the storage unit 220 is configured to store the new configuration file.
  • the second sending unit 230 is configured to send the new configuration file to the slave node
  • the new configuration file is used to replace the old configuration file in the slave node, and is loaded into the slave node memory for processing of the search task.
  • the specific structure of the first receiving unit 210 may be a receiving interface, such as a receiving antenna or an RJ45, and a fiber interface equal to a communication interface of the master node.
  • the specific structure of the storage unit 220 may include a storage medium; preferably a non-transitory storage medium.
  • the specific interface of the second sending unit 230 can be a Boakai sending interface, such as a transmitting antenna or Other wired sending interfaces, connected to the slave node.
  • the second sending unit 230 is further configured to send a loading notification to the slave node
  • the loading notification is used to trigger the slave node to load into the memory of the slave node after receiving the new configuration file.
  • the master node described in the foregoing embodiment provides the hardware support for the method described in the second embodiment, and can be used to implement the method in any of the second embodiment.
  • the same method reduces the relationship between the master node and the slave node. The cumbersomeness of configuration file synchronization, the intelligence of the device is improved, and the synchronization cost is reduced.
  • the embodiment further provides a configuration file update device based on a zookeeper distributed search engine system, where the device is a slave node, and the slave node includes:
  • the second receiving unit 310 is configured to receive a new configuration file sent by the zookeeper
  • the loading unit 320 is configured to load the new configuration file to replace the old configuration file into the memory.
  • the specific structure of the second receiving unit 310 may include a receiving interface, such as a receiving antenna or a wired receiving interface, such as a fiber optic interface, a twisted pair interface, or a coaxial cable interface.
  • a receiving interface such as a receiving antenna or a wired receiving interface, such as a fiber optic interface, a twisted pair interface, or a coaxial cable interface.
  • the loading unit 320 can be a processor; the slave node further includes a memory; the processor loads the received new configuration file into the memory to replace the old configuration file.
  • the second receiving unit 310 is further configured to receive a loading notification sent by the zookeeper
  • the loading unit 320 is configured to load the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • the master node described in the foregoing embodiment provides the hardware support for the method described in the third embodiment, and can be used to implement the method in any of the third embodiment.
  • the same method reduces the relationship between the master node and the slave node.
  • the cumbersomeness of profile synchronization and the intelligence of the device Reduce the cost of synchronization and other advantages.
  • this embodiment provides a configuration file update system based on a zookeeper distributed search engine system, where the system includes:
  • the master node 410 is configured to detect whether the master node forms a new configuration file, and send the new configuration file to the zookeeper when it is determined that a new configuration file is formed;
  • Zookeeper 420 configured to receive and store the new configuration file, and send the new configuration file to a slave node
  • a slave node configured to receive the new configuration file and load the new configuration file to replace the old replacement file into the memory.
  • the master node and the slave node may have multiple.
  • the slave node includes a slave node 431 and a slave node 432.
  • the zookeeper is a management system of the slave node and the slave node, and may have one or more physical devices. Multiple devices are connected via the Internet. The zookeeper is used to manage the master node and the slave node.
  • the zookeeper 420 is further configured to send a loading notification to the slave node
  • the slave node is further configured to receive the loading notification
  • the slave node is configured to load the new configuration file to replace the old replacement file into the memory under the trigger of the loading notification.
  • the master node described in the foregoing embodiment provides the hardware support for the method described in the fourth embodiment, and can be used to implement the method in any of the fourth embodiment.
  • the same method reduces the relationship between the master node and the slave node. The cumbersomeness of configuration file synchronization, the intelligence of the device is improved, and the synchronization cost is reduced.
  • Embodiments of the present invention also describe a computer storage medium in which the computer storage medium Storing computer executable instructions configured to perform at least one of the methods of Embodiments 1 through 4 of the present invention; specifically, at least one of FIGS. 3, 5, 6, and 7.
  • the computer storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which may store a program code.
  • the computer storage medium is preferably a non-transitory storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种基于zookeeper分布式搜索引擎系统的配置文件更新方法、装置及系统,所述方法包括:检测master节点是否形成了新的配置文件;及当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;其中,所述新的配置文件用于通过所述zookeeper发送到slave节点。本发明还同时公开了一种计算机存储介质。

Description

配置文件更新方法、装置及系统和计算机存储介质 技术领域
本发明涉及通信领域的配置文件更新技术,尤其涉及一种基于zookeeper分布式搜索引擎系统的配置文件更新方法、装置及系统和计算机存储介质。。
背景技术
图1所示的为一种分布时搜索引擎系统,分布式搜索引擎系统通常是通过zookeeper进行系统管理的。分布式搜索引擎系统包括主master节点和从slave节点,master节点和slave节点上正常运行情况下都会有多个搜索任务,可以根据上层应用的业务场景来定制搜索任务。图1中的所述的slave节点包括slave节点1和slave节点2。
master节点的搜索任务有采集数据需求的配置文件,搜索任务通过更改这些配置文件采集上层应用需求的数据,然后进行索引处理,生成索引文件,通过检索接口对外提供搜索服务。
slave节点的搜索任务没有上述配置文件,slave节点获取上述配置文件的方法为:
master节点上的配置文件需要先上传到zookeeper上;
slave节点从zookeeper上获取配置文件并加载到内存中。
在成功加载配置文件后,所述slave节点与所述master节点一样,通过上层应用相应的搜索任务进行索引处理,同样生成索引文件,通过检索接口对外提供搜索服务;从而实现搜索任务的分布式处理。
随着上层应用业务场景的需求变更,搜索引擎系统master节点的搜索任务下的配置文件需要对应更新。当master节点内的配置文件更新后,为 了实现slave节点与master节点的配置文件的同步,管理人员将手动的重启master节点,使master节点将配置文件上传到zookeeper中。
图2所示为现有技术中master节点和slave节点之间配置文件同步的方法,
包括:
步骤S1:master节点在重启时开始上传配置文件到zookeeper;
步骤S2:slave节点在重启时开始读取存储在zookeeper中的配置文件。
由图2可知,master节点更新完成后,需要在管理人员手动触发下重启,才能把更新后的配置文件上传到zookeeper;slave节点同样需要在管理人员的手动触发重启,才会去zookeeper获取一次最新的配置文件并加载到内存;不管是master节点还是slave节点重启均要等待数分钟才能恢复到正常工作,比较影响效率。
发明内容
有鉴于此,本发明实施例期望提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法、装置及系统和计算机存储介质,以自动实现实slave节点的配置文件与master节点之间配置文件的同步并提高master节点与slave节点之间配置文件同步的效率。
为达到上述目的,本发明实施例的技术方案是这样实现的:
本发明实施例第一方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
检测master节点是否形成了新的配置文件;
当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
所述新的配置文件用于通过所述zookeeper发送到slave节点。
优选地,所述检测master节点是否形成了新的配置文件为:
获取前一次配置文件的更新时间;
检测所述master节点的配置文件的更新时间;
当检测结果表明所述更新时间发生了变化时,确定是否形成了新的配置文件。
优选地,所述检测所述master节点的配置文件的更新时间为:
通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
本发明实施例第二方面提供的一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
接收并存储master节点发送的新的配置文件;
将所述新的配置文件发送给slave节点;
所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
优选地,所述方法还包括:
向所述slave节点发送加载通知;
所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
本发明实施例第三方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
接收zookeeper发送的新的配置文件;
将所述新的配置文件替换旧的配置文件加载到内存中。
优选地,所述方法还包括:
接收zookeeper发送的加载通知;
所述将所述新的配置文件替换旧的配置文件加载到内存中为:
在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
本发明实施例第四方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
master节点检测master节点是否形成了新的配置文件;
当确定形成了新的配置文件时,master节点将所述新的配置文件发送到zookeeper;
zookeeper接收并存储所述新的配置文件;
zookeeper向slave节点发送所述新的配置文件;
slave节点接收所述新的配置文件;
slave节点将所述新的配置文件替换旧的替换文件加载到内存中。
优选地,所述方法还包括:
所述zookeeper还向所述slave节点发送加载通知;
所述slave节点接收所述加载通知;
所述slave节点加载所述新的配置文件为:
所述slave节点在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
本发明实施例第五方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为master节点;其中,所述master节点包括:
检测单元,配置为检测master节点是否形成了新的配置文件;
第一发送单元,配置为当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
所述新的配置文件用于通过所述zookeeper发送到slave节点。
优选地,所述检测单元包括:
记录模块,配置为获取前一次配置文件的更新时间;
检测模块,配置为检测所述master节点的配置文件的更新时间;
确定模块,配置为当检测结果表明所述更新时间发生了变化时,确定 是否形成了新的配置文件。
优选地,所述检测模块,配置为通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
本发明实施例第六方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为zookeeper;所述zookeeper包括:
第一接收单元,配置为接收master节点发送的新的配置文件;
存储单元,配置为存储所述新的配置文件;
第二发送单元,配置为将所述新的配置文件发送给slave节点;
所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
优选地,所述zookeeper还包括:
所述第二发送单元,还配置为向所述slave节点发送加载通知;
所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
本发明实施例第七方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为slave节点,所述slave节点包括:
第二接收单元,配置为接收zookeeper发送的新的配置文件;
加载单元,配置为将所述新的配置文件替换旧的配置文件加载到内存中。
优选地,所述第二接收单元,还配置为接收zookeeper发送的加载通知;
所述加载单元,配置为在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
本发明实施例第八方面提供一种基于zookeeper分布式搜索引擎系统的配置文件更新系统,所述系统包括:
master节点,配置为检测master节点是否形成了新的配置文件,及当 确定形成了新的配置文件时将所述新的配置文件发送到zookeeper;
zookeeper,配置为接收并存储所述新的配置文件,及向slave节点发送所述新的配置文件;
slave节点,配置为接收所述新的配置文件,及将所述新的配置文件替换旧的替换文件加载到内存中。
优选地,所述zookeeper,还配置为向所述slave节点发送加载通知;
所述slave节点,还配置为接收所述加载通知;
所述slave节点,配置为在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
本发明实施例第九方面提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为本发明实施例第一方面至第四方面所述方法的至少其中之一。
本发明实施例中所述的基于zookeeper分布式搜索引擎系统的配置文件更新方法、装置及系统和计算机存储介质,主动检测master节点中的配置文件是否有更新,若有更新形成了新的配置文件,主动发送到用于为slave节点提供配置文件更新获取源的zookeeper;不用再等到master节点在管理人员触发下重启后,才将新的配置文件发送到zookeeper;从而提高了同步的时效,新的配置文件的发送不再伴随着master节点的重启,从而将新的配置文件发送到zookeeper的成本。
附图说明
图1为一种分布时搜搜引擎系统的结构示意图;
图2为现有配置文件的同步方法的流程示意图;
图3为本发明实施例所述的基于zookeeper分布式搜索引擎系统的配置文件更新方法的流程示意图之一;
图4为本发明实施例中图3中步骤S110的流程示意图;
图5为本发明实施例所述的基于zookeeper分布式搜索引擎系统的配置文件更新方法的流程示意图之二;
图6为本发明实施例所述的基于zookeeper分布式搜索引擎系统的配置文件更新方法的流程示意图之三;
图7为本发明实施例所述的基于zookeeper分布式搜索引擎系统的配置文件更新方法的流程示意图之四;
图8为本发明实施例所述的master节点的结构示意图;
图9为本发明实施例所述的检测单元的结构示意图;
图10为本发明实施例所述的zookeeper的结构示意图;
图11为本发明实施例所述的slave节点的结构示意图;
图12为本发明实施例所述的基于zookeeper分布式搜索引擎系统的配置文件更新系统结构示意图。
具体实施方式
以下结合附图对本发明的优选实施例进行详细说明,应当理解,以下所说明的优选实施例仅用于说明和解释本发明,并不用于限定本发明。
如图3所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
步骤S110:检测master节点是否形成了新的配置文件;
步骤S120:当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
所述新的配置文件用于通过所述zookeeper发送到slave节点。
在本实施例中所述的步骤主要应用于master节点中,master节点会自动检测其内部的配置文件已经更新,形成了新的配置文件;若形成了新的配置文件将主动推送到zookeeper,而不需要等到管理人员触发重启之后再发送到zookeeper,显然master节点,不需要为了发送新的配置文件而停下 手头的工作,重启后再发送所述新的配置文件,直接就发送配置文件;显然master发送新的配置文件的操作更加简单,效率更高;降低了master节点和slave节点之间配置文件之间的同步成本。
优选地,
所述步骤S110优选为:
步骤S111:获取前一次配置文件的更新时间;
步骤S112:检测所述master节点的配置文件的更新时间;
步骤S113:当检测结果表明所述更新时间发生了变化时,确定是否形成了新的配置文件。
譬如配置文件上一次更新时间为2014年5月23日10:25;
本次检测更新时间为2014年5月28日12:25;
发现两次更新时间发生了变化,此时master节点即可知道此时配置文件更新了,形成了新的配置文件发送给zookeeper。
在本实施例中优选以配置文件的更新时间来判断是否形成了新的配置文件,在具体的实现过程中,master节点可以通过备份形成备份配置文件;将备份配置文件周期性与master节点正在使用的当前配置文件进行比较;若当前配置文件不同于备份配置文件,同样可认为形成了新的配置文件;则将所述新的配置文件发送到zookeeper,并将新的配置文件存储下来作为当前的备份文件。
在具体的实现过程中,能够用来检测是否形成了新的配置文件的方法有多种,不局限上述两种。
此外,在本实施例中优选为:
通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
采用脚本进程来定时或实时监控所述更新时间,实现简单且能及时的 发现是否形成了新的配置文件,从而延时小效率高。
综合上述本实施例提供了一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,应用于master节点中的,通过自动检测master节点内是否形成了新的配置文件,并在检测到形成了新的配置文件后主动上传到zookeeper,不需要管理人员在发现master节点形成了新的配置文件之后,重启master节点才将新的配置文件上传,显然降低了master节点与slave节点间配置文件同步的繁琐性,提高了设备的智能性,降低了同步成本。
实施例二:
如图5所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
步骤S210:接收并存储master节点发送的新的配置文件;
步骤S220:将所述新的配置文件发送给slave节点;
所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
本实施例所述的方法为应用在zookeeper侧的方法,所述zookeeper为所述master节点和slave节点的管理结构,可以与所述master节点和/或slave节点对应不同的物理设备,也可以对应同样的物理设备。
在本实施例中所述zookeeper主动将接收到的配置文件发送给slave节点,而不是被动的等着slave节点请求再发送,从而使得同步更加及时。
在具体的实现过程中,所述zookeeper在接收到所述新的配置文件之后,向所述slave节点发送下载通知,在接收所述slave节点基于所述下载通知向所述zookeeper发送指令;所述zookeeper在接收到发送指令触发下,向所述slave节点发送所述新的配置文件。从而slave节点在接收所述下载通知之后,向zookeeper主动获取所述新的配置文件。
所述方法还包括:
向所述slave节点发送加载通知;
所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
在本实施例中所述zookeeper不仅主动向所述slave节点发送新的配置文件,还向所述slave节点发送加载通知;在具体的实现过程中所述加载通知可以与所述新的配置文件一起发,从而减少与slave节点之间的信息交互次数;或单独发送,具体的实现方式有多种,在此就不做一一限定了。
综合上述,本实施例提供了一种由zookeeper主动推送新的配置文件给slave节点的方法,而非由slave节点在重启时来获取,并通过发送加载通知使slave节点及时加载新的配置文件,简便的实现了master节点和slave节点之间的同步,slave节点不用重启,更不用管理人员手动触发slave节点的重启。
实施例三:
如图6所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
步骤S310:接收zookeeper发送的新的配置文件;
步骤S320:将所述新的配置文件替换旧的配置文件加载到内存中。
在本实施例所述的方法主要应用于slave节点中,slave节点不再是在重启时主动获取zookeeper中的配置文件,而是接收zookeeper主动发送的文件,在接收到新的配置文件后,主动替换新的配置文件,实现与master节点的配置文件同步不需要重启,从而降低了同步成本,提高了同步效率。
此外,所述方法还包括:
接收zookeeper发送的加载通知;
所述步骤S320具体为:在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
通过所述加载通知的接收,slave节点知道何时将新的配置文件爱你加载到内存中,实现简便快捷。
实施例四:
如图7所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
步骤S410:master节点检测master节点是否形成了新的配置文件;
步骤S420:当确定形成了新的配置文件时,master节点将所述新的配置文件发送到zookeeper;
步骤S430:zookeeper接收并存储所述新的配置文件;
步骤S440:zookeeper向slave节点发送所述新的配置文件;
步骤S450:slave节点接收所述新的配置文件;
步骤S460:slave节点将所述新的配置文件替换旧的替换文件加载到内存中。
优选地,所述方法还包括:
所述zookeeper还向所述slave节点发送加载通知;
所述slave节点接收所述加载通知;
所述步骤S460为:
所述slave节点在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
在本实施例中所述master节点执行的步骤的详细描述可参见实施例一;所述zookeeper执行的步骤的详细描述可参见实施例二;所述slave节点执行的步骤的详细描述可参见实施例三;本实施例提供的方法,相对于现有方法不用管理人员手动重启master节点和slave节点来实现slave节点和master节点之间的同步,从而操作简单,slave节点和master节点都不用停下正在处理的任务去重启即可实现同步,从而降低了同步成本,提高了 同步效率。
实施例五:
如图8所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为master节点;所述master节点包括:
检测单元110,配置为检测master节点是否形成了新的配置文件;
第一发送单元120,配置为当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
所述新的配置文件用于通过所述zookeeper发送到slave节点。
所述检测单元110的具体结构可包括处理器及存储介质;所述存储介质上存储有计算机可读指令;所述处理器通过总线等master节点内部的通信接口读取所述可读指令,并执行所述可读指令可完成检测master节点是否形成了新的配置文件的功能。
所述处理器可包括中央处理器、微处理器、数字信号处理器或可编程逻辑阵列等具有处理功能的处理器。
所述第一发送单元120的具体结构可包括通信接口;所述通信接口可包括有线通信接口和无线通信接口,具体如RJ45;收发天线等结构。
优选地,如图9所示,所述检测单元110包括:
记录模块111,配置为获取前一次配置文件的更新时间;
检测模块112,配置为检测所述master节点的配置文件的更新时间;
确定模块113,配置为当检测结果表明所述更新时间发生了变化时,确定是否形成了新的配置文件。
所述记录模块111的具体结构可包括存储介质,存储前一次配置文件的更新时间;
所述检测模块112的具体结构可包括计时器和比较器或处理器等结构,所述计时器配置为记录最近一次配置文件的更新时间;比较器配置为将最 近一次配置文件的更新时间与记录在记录模块111中的更新时间进行比较,形成比较结果。
所述确定模块113根据所述比较结果,确定是否形成了新的配置文件,具体结构可为处理器或逻辑电路等。
优选地,
所述检测模块112,配置为通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
在本实施例中所述检测模块112优选为运行有脚本进程的处理器。
综合上述本实施例所述的master节点为实施例一中所述的方法提供了硬件支撑,能用来实现实施例一中任一所述的方法,同样的具有降低了master节点与slave节点间配置文件同步的繁琐性、提高了设备的智能性及降低了同步成本等优点。
实施例六:
如图10所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为zookeeper;所述zookeeper包括:
第一接收单元210,配置为接收master节点发送的新的配置文件;
存储单元220,配置为存储所述新的配置文件;
第二发送单元230,配置为将所述新的配置文件发送给slave节点;
所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
所述第一接收单元210的具体结构可为接收接口,如接收天线或RJ45、光纤接口等于所述master节点连接的通信接口。
所述存储单元220的具体结构可包括存储介质;优选为非瞬间存储介质。
所述第二发送单元230的具体接口可博阿凯发送接口,如发送天线或 其他有线发送接口,与slave节点连接。
此外,所述第二发送单元230,还配置为向所述slave节点发送加载通知;
所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
综合上述本实施例所述的master节点为实施例二中所述的方法提供了硬件支撑,能用来实现实施例二中任一所述的方法,同样的具有降低了master节点与slave节点间配置文件同步的繁琐性、提高了设备的智能性及降低了同步成本等优点。
实施例七:
如图11所示,本实施例还提供一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为slave节点,所述slave节点包括:
第二接收单元310,配置为接收zookeeper发送的新的配置文件;
加载单元320,配置为将所述新的配置文件替换旧的配置文件加载到内存中。
所述第二接收单元310的具体结构可包括接收接口,如接收天线或有线接收接口,如光纤接口,双绞线接口或同轴电缆接口。
所述加载单元320可为处理器;所述slave节点还包括内存;所述处理器把接收的新的配置文件加载到内存中替换掉旧的配置文件。
所述第二接收单元310,还配置为接收zookeeper发送的加载通知;
所述加载单元320,配置为在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
综合上述本实施例所述的master节点为实施例三中所述的方法提供了硬件支撑,能用来实现实施例三中任一所述的方法,同样的具有降低了master节点与slave节点间配置文件同步的繁琐性、提高了设备的智能性及 降低了同步成本等优点。
实施例八:
如图12所示,本实施例提供一种基于zookeeper分布式搜索引擎系统的配置文件更新系统,所述系统包括:
master节点410,配置为检测master节点是否形成了新的配置文件,及当确定形成了新的配置文件时将所述新的配置文件发送到zookeeper;
zookeeper 420,配置为接收并存储所述新的配置文件,及向slave节点发送所述新的配置文件;
slave节点,配置为接收所述新的配置文件,及将所述新的配置文件替换旧的替换文件加载到内存中。
在具体的实现过程中,所述master节点以及所述slave节点都可以有多个,在图11所示的系统中,所述slave节点包括slave节点431以及slave节点432。
所述zookeeper为所述slave节点和所述slave节点的管理系统,可以有一个或多个物理设备构成。多个设备之间通过互联网连接。所述zookeeper用来管理所述master节点和slave节点。
所述zookeeper 420,还配置为向所述slave节点发送加载通知;
所述slave节点,还配置为接收所述加载通知;
所述slave节点,配置为在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
综合上述本实施例所述的master节点为实施例四中所述的方法提供了硬件支撑,能用来实现实施例四中任一所述的方法,同样的具有降低了master节点与slave节点间配置文件同步的繁琐性、提高了设备的智能性及降低了同步成本等优点。
本发明实施例还记载了一种计算机存储介质,所述计算机存储介质中 存储有计算机可执行指令,所述计算机可执行指令配置为执行本发明实施例一至实施例四所述方法的至少其中之一;具体如图3、图5、图6及图7中的至少其中之一;所述计算机存储介质可包括只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质;所述计算机存储介质优选为非瞬间存储介质。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡按照本发明原理所作的修改,都应当理解为落入本发明的保护范围。

Claims (19)

  1. 一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
    检测master节点是否形成了新的配置文件;
    当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
    所述新的配置文件用于通过所述zookeeper发送到slave节点。
  2. 根据权利要求1所述的方法,其中,
    所述检测master节点是否形成了新的配置文件为:
    获取前一次配置文件的更新时间;
    检测所述master节点的配置文件的更新时间;
    当检测结果表明所述更新时间发生了变化时,确定是否形成了新的配置文件。
  3. 根据权利要求2所述的方法,其中,
    所述检测所述master节点的配置文件的更新时间为:
    通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
  4. 一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
    接收并存储master节点发送的新的配置文件;
    将所述新的配置文件发送给slave节点;
    所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
  5. 根据权利要求4所述的方法,其中,所述方法还包括:
    向所述slave节点发送加载通知;
    所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
  6. 一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,所述方法包括:
    接收zookeeper发送的新的配置文件;
    将所述新的配置文件替换旧的配置文件加载到内存中。
  7. 根据权利要求6所述的方法,其中,
    所述方法还包括:
    接收zookeeper发送的加载通知;
    所述将所述新的配置文件替换旧的配置文件加载到内存中为:
    在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
  8. 一种基于zookeeper分布式搜索引擎系统的配置文件更新方法,其中,所述方法包括:
    master节点检测master节点是否形成了新的配置文件;
    当确定形成了新的配置文件时,master节点将所述新的配置文件发送到zookeeper;
    zookeeper接收并存储所述新的配置文件;
    zookeeper向slave节点发送所述新的配置文件;
    slave节点接收所述新的配置文件;
    slave节点将所述新的配置文件替换旧的替换文件加载到内存中。
  9. 根据权利要求8所述的方法,其中,
    所述方法还包括:
    所述zookeeper还向所述slave节点发送加载通知;
    所述slave节点接收所述加载通知;
    所述slave节点加载所述新的配置文件为:
    所述slave节点在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
  10. 一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为master节点;所述master节点包括:
    检测单元,配置为检测master节点是否形成了新的配置文件;
    第一发送单元,配置为当确定形成了新的配置文件时,将所述新的配置文件发送到zookeeper;
    所述新的配置文件用于通过所述zookeeper发送到slave节点。
  11. 根据权利要求10所述的装置,其中,
    所述检测单元包括:
    记录模块,配置为获取前一次配置文件的更新时间;
    检测模块,配置为检测所述master节点的配置文件的更新时间;
    确定模块,配置为当检测结果表明所述更新时间发生了变化时,确定是否形成了新的配置文件。
  12. 根据权利要求11所述的装置,其中,
    所述检测模块,配置为通过运行在所述master节点中的脚本进程定时或实时检测所述master节点的配置文件的更新时间。
  13. 一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为zookeeper;所述zookeeper包括:
    第一接收单元,配置为接收master节点发送的新的配置文件;
    存储单元,配置为存储所述新的配置文件;
    第二发送单元,配置为将所述新的配置文件发送给slave节点;
    所述新的配置文件用于替换所述slave节点中的旧的配置文件,加载到所述slave节点内存中用于搜索任务的处理。
  14. 根据权利要求13所述的装置,其中,所述zookeeper还包括:
    所述第二发送单元,还配置为向所述slave节点发送加载通知;
    所述加载通知用于触发所述slave节点在接收到所述新的配置文件之后,加载到所述slave节点的内存中。
  15. 一种基于zookeeper分布式搜索引擎系统的配置文件更新装置,所述装置为slave节点,所述slave节点包括:
    第二接收单元,配置为接收zookeeper发送的新的配置文件;
    加载单元,配置为将所述新的配置文件替换旧的配置文件加载到内存中。
  16. 根据权利要求15所述的装置,其中,
    所述第二接收单元,还配置为接收zookeeper发送的加载通知;
    所述加载单元,配置为在所述加载通知的触发下,将所述新的配置文件替换旧的替换文件加载到内存中。
  17. 一种基于zookeeper分布式搜索引擎系统的配置文件更新系统,所述系统包括:
    master节点,配置为检测master节点是否形成了新的配置文件,及当确定形成了新的配置文件时将所述新的配置文件发送到zookeeper;
    zookeeper,配置为接收并存储所述新的配置文件,及向slave节点发送所述新的配置文件;
    slave节点,配置为接收所述新的配置文件,及将所述新的配置文件替换旧的替换文件加载到内存中。
  18. 根据权利要求17所述的系统,其中,
    所述zookeeper,还配置为向所述slave节点发送加载通知;
    所述slave节点,还配置为接收所述加载通知;
    所述slave节点,配置为在所述加载通知的触发下,将所述新的配置文 件替换旧的替换文件加载到内存中。
  19. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行权利要求1至9所述方法的至少其中之一。
PCT/CN2014/086989 2014-06-12 2014-09-19 配置文件更新方法、装置及系统和计算机存储介质 WO2015188501A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410261261.9 2014-06-12
CN201410261261.9A CN105320527A (zh) 2014-06-12 2014-06-12 基于zookeeper分布式搜索引擎的配置文件更新方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2015188501A1 true WO2015188501A1 (zh) 2015-12-17

Family

ID=54832803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/086989 WO2015188501A1 (zh) 2014-06-12 2014-09-19 配置文件更新方法、装置及系统和计算机存储介质

Country Status (2)

Country Link
CN (1) CN105320527A (zh)
WO (1) WO2015188501A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878053A (zh) * 2016-12-22 2017-06-20 努比亚技术有限公司 一种基于zookeeper的配置更新装置及其方法
CN108958885A (zh) * 2018-06-27 2018-12-07 郑州云海信息技术有限公司 一种配置信息的管理方法及装置
CN110196780A (zh) * 2018-03-23 2019-09-03 腾讯科技(深圳)有限公司 确定服务器状态的方法、装置、存储介质和电子装置
CN110471697A (zh) * 2019-07-12 2019-11-19 深圳追一科技有限公司 配置方法及相关产品
CN114025407A (zh) * 2021-10-29 2022-02-08 深圳市康必达控制技术有限公司 设备通讯方法、装置、计算机设备和存储介质

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291487A (zh) * 2016-04-13 2017-10-24 平安科技(深圳)有限公司 系统配置文件修改方法和系统
CN106055350B (zh) * 2016-05-19 2019-07-26 珠海豹趣科技有限公司 配置文件的升级处理方法以及装置
CN106339511A (zh) * 2016-10-28 2017-01-18 广东电网有限责任公司电力调度控制中心 一种电力调度自动化系统的源配置自动同步系统及其方法
CN106685706A (zh) * 2016-12-14 2017-05-17 深圳中顺易金融服务有限公司 一种基于Zookeeper的配置更新方法及系统
CN107273540B (zh) * 2017-07-05 2021-09-24 北京三快在线科技有限公司 分布式搜索及索引更新方法、系统、服务器及计算机设备
CN107908708A (zh) * 2017-11-09 2018-04-13 北京锐安科技有限公司 一种集群文件同步的方法、系统、设备和存储介质
CN109976822B (zh) * 2017-12-25 2022-04-08 天翼云科技有限公司 分布式应用的配置方法、装置以及分布式系统
CN109446170B (zh) * 2018-09-13 2024-01-19 北京米文动力科技有限公司 一种配置文件数据同步方法及设备
CN109831323B (zh) * 2019-01-15 2022-04-05 网宿科技股份有限公司 服务器信息的管理方法、管理系统及服务器
CN110246006A (zh) * 2019-05-26 2019-09-17 必成汇(成都)科技有限公司 分布式环境动态分配撮合任务量的方法
CN110618996B (zh) * 2019-08-07 2023-08-22 北京东方国信科技股份有限公司 一种应用于分布式数据库的函数库热更新方法
CN111737018B (zh) * 2020-08-26 2020-12-22 腾讯科技(深圳)有限公司 ZooKeeper配置文件存储处理方法、装置、设备及其介质
CN113342370A (zh) * 2021-05-25 2021-09-03 北京小米移动软件有限公司 一种配置更新的方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977124A (zh) * 2010-11-05 2011-02-16 山东中创软件工程股份有限公司 基于ZooKeeper技术的业务集群方法及系统
CN103312809A (zh) * 2013-06-24 2013-09-18 北京汉柏科技有限公司 云平台中服务的分布式管理方法
CN103500111A (zh) * 2013-10-11 2014-01-08 北京奇虎科技有限公司 一种基于zookeeper的信息配置方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101977124A (zh) * 2010-11-05 2011-02-16 山东中创软件工程股份有限公司 基于ZooKeeper技术的业务集群方法及系统
CN103312809A (zh) * 2013-06-24 2013-09-18 北京汉柏科技有限公司 云平台中服务的分布式管理方法
CN103500111A (zh) * 2013-10-11 2014-01-08 北京奇虎科技有限公司 一种基于zookeeper的信息配置方法及装置

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878053A (zh) * 2016-12-22 2017-06-20 努比亚技术有限公司 一种基于zookeeper的配置更新装置及其方法
CN110196780A (zh) * 2018-03-23 2019-09-03 腾讯科技(深圳)有限公司 确定服务器状态的方法、装置、存储介质和电子装置
CN110196780B (zh) * 2018-03-23 2020-06-23 腾讯科技(深圳)有限公司 确定服务器状态的方法、装置、存储介质和电子装置
CN108958885A (zh) * 2018-06-27 2018-12-07 郑州云海信息技术有限公司 一种配置信息的管理方法及装置
CN110471697A (zh) * 2019-07-12 2019-11-19 深圳追一科技有限公司 配置方法及相关产品
CN114025407A (zh) * 2021-10-29 2022-02-08 深圳市康必达控制技术有限公司 设备通讯方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN105320527A (zh) 2016-02-10

Similar Documents

Publication Publication Date Title
WO2015188501A1 (zh) 配置文件更新方法、装置及系统和计算机存储介质
CN108881477B (zh) 一种基于分布式的文件采集监控的方法
US20140089619A1 (en) Object replication framework for a distributed computing environment
CN107315825B (zh) 一种索引更新系统、方法及装置
US20140244583A1 (en) Method of Processing File changes and Electronic Device Thereof
US20170031948A1 (en) File synchronization method, server, and terminal
WO2015117426A1 (zh) 文件管理方法及装置
CN104239476A (zh) 一种数据库同步的方法、装置及系统
CA2896865C (en) Method and system for using a recursive event listener on a node in hierarchical data structure
US9367261B2 (en) Computer system, data management method and data management program
CN111737230B (zh) 数据校验方法、装置、电子设备以及可读存储介质
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
US20140229436A1 (en) Method of File Synchronization and Electronic Device Thereof
CN107145562B (zh) 一种数据同步方法、装置及系统
US11455117B2 (en) Data reading method, apparatus, and system, avoiding version rollback issues in distributed system
US20170054803A1 (en) Information processing device, method, and system
CN112860282B (zh) 集群插件的升级方法、装置和服务器
CN110543512A (zh) 一种信息同步方法,装置及系统
CN106817387B (zh) 一种数据同步方法、装置和系统
CN111342986B (zh) 分布式节点管理方法及装置、分布式系统、存储介质
US9313653B2 (en) Information processing device, server device, data communication system, data communication method, and computer-readable storage medium storing data communication program
CN109542981B (zh) 一种数据同步的系统及方法、电子设备、存储介质
JP2016045839A5 (zh)
CN110780944A (zh) 一种应用权限的启动方法、设备及机器可读存储介质
CN110955460A (zh) 一种服务进程启动方法、装置、电子设备和存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14894311

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14894311

Country of ref document: EP

Kind code of ref document: A1