CN105159767A - Method and device for realizing distributed scheduling on the basis of zookeeper - Google Patents

Method and device for realizing distributed scheduling on the basis of zookeeper Download PDF

Info

Publication number
CN105159767A
CN105159767A CN201510561242.2A CN201510561242A CN105159767A CN 105159767 A CN105159767 A CN 105159767A CN 201510561242 A CN201510561242 A CN 201510561242A CN 105159767 A CN105159767 A CN 105159767A
Authority
CN
China
Prior art keywords
dispatch application
distributed
follow
application
dispatch
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.)
Granted
Application number
CN201510561242.2A
Other languages
Chinese (zh)
Other versions
CN105159767B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510561242.2A priority Critical patent/CN105159767B/en
Publication of CN105159767A publication Critical patent/CN105159767A/en
Application granted granted Critical
Publication of CN105159767B publication Critical patent/CN105159767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for realizing distributed scheduling on the basis of zookeeper. The method comprises the following steps: registering a plurality of scheduling applications in a distributed queue on a zookeeper registration center; calling a first scheduling application in a plurality of registered scheduling applications to allot a distributed lock to the first scheduling application so as to cause the first scheduling application to execute a task; and when the first scheduling application obtains the allotted distributed lock, utilizing the first scheduling application to execute the corresponding task.

Description

For realizing the method and apparatus of distributed scheduling based on zookeeper
Technical field
The disclosure relates generally to distributed scheduling, more specifically, relates to the method and apparatus for realizing distributed scheduling based on zookeeper.
Background technology
In internet and e-commerce field, big data quantity, high concurrent be urgent problem.The service logic that elapsed time is relatively grown all can be stripped out to carry out asynchronous process to it from user behavior.Can not only Consumer's Experience be promoted like this, and the extensibility of system can be increased.Therefore distributed task dispatching obtains application widely.
At present, distributed task dispatching framework has a lot.The technology such as such as TBSchedule, Quartz can realize distributed task dispatching.TBSchedule is by task matching in the Java Virtual Machine (JavaVirtualMachine) of multiple main frame, then by different threads group executing tasks parallelly.When executing the task process data be all be fragmented after data, this can ensure that task is processed fast when not repeating and not being missed.Multiple node tasks, when realizing distributed task dispatching, is stored in database by Quartz.When executing the task, Quartz takes out trigger to execute the task from database, if the title of trigger is identical with the execution time, then only has a node to go to perform this task.If this node is executed the task unsuccessfully, then this task then can be assigned to the execution of another node, thus realizes distributed task dispatching.In other words, zookeeper is distributed application program coordination service, and it carries out burst to data, and multiple should spending performs process, ensures that data are not repeatedly processed through vaporization, condensation and absorption, promotes processing speed; And Quartz is job scheduling framework of increasing income, it utilizes database to carry out control task scheduling, namely carrys out Controlling vertex by database, ensures that synchronization only has a node executing the task.
But, these two kinds of implementations all existing defects.For zookeeper, owing to carrying out burst to data, therefore multitask performs simultaneously, and operating database is frequent, higher to the requirement of database, easily to database build-up of pressure, and database may be caused to delay machine.Although this implementation is applicable to fast processing big data quantity, in process timer-triggered scheduler demand, underaction.And for Quartz, owing to utilizing database control task to dispatch, therefore framework is integrated more complicated, strong to database dependence, and when data-base cluster is disposed, need to carry out time calibration to each database server, otherwise scheduling meeting is gone wrong.
The each have their own feature of current distributed scheduling framework, applicable scene is more single, relies on stronger to database.In Project-developing process, because the polytrope of demand, distributed scheduling framework can only meet a part of demand, and for the realization of another part demand, often need to carry out encapsulation transformation to the distributed scheduling framework selected, or realized by coding break-in, bring great inconvenience to Project-developing work.
Summary of the invention
Given this, the present invention proposes the method and apparatus for realizing distributed scheduling based on zookeeper.
In one aspect of the invention, disclose a kind of method for realizing distributed scheduling based on zookeeper, comprising:
Multiple dispatch application is registered in the distributed queue at place of zookeeper registration center;
Call the first dispatch application in multiple dispatch application of registration, with to described first dispatch application assignment profile formula lock, only described first dispatch application can be executed the task; And
When described first dispatch application obtains the distributed lock distributed, described first dispatch application is utilized to perform corresponding task.
Preferably, according to the first dispatch application described in fifo fifo sequence call.
Preferably, when described first dispatch application occurs abnormal, described first dispatch application exits described distributed queue.
Preferably, after described first dispatch application exits described distributed queue, described method also comprises:
Call the follow-up dispatch application in multiple dispatch application of registration, with to described follow-up dispatch application assignment profile formula lock, only described follow-up dispatch application can be executed the task; And
When described follow-up dispatch application obtains the distributed lock distributed, described follow-up dispatch application is utilized to perform corresponding task.
Preferably, according to follow-up dispatch application described in fifo fifo sequence call.
Preferably, described multiple dispatch application is Quartz dispatch application.
In another aspect of the present invention, disclose a kind of method for realizing distributed scheduling based on zookeeper, comprising:
Multiple dispatch application is registered in the distributed queue at place of zookeeper registration center;
Call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with described first dispatch application; And
After described first dispatch application performs corresponding task, described first dispatch application is aligned to the afterbody of described distributed queue.
Preferably, according to the first dispatch application described in fifo fifo sequence call.
Preferably, after described first dispatch application is aligned to the afterbody of described distributed queue, described method also comprises:
Call follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with described follow-up dispatch application; And
After continuous dispatch application performs corresponding task in the rear, described follow-up dispatch application is aligned to the afterbody of described distributed queue.
Preferably, according to follow-up dispatch application described in fifo fifo sequence call.
Preferably, described multiple dispatch application is Quartz dispatch application.
In another aspect of the present invention, disclose a kind of device for realizing distributed scheduling based on zookeeper, comprising:
Registering unit, is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center;
Allocation units, are configured to the first dispatch application called in multiple dispatch application of registration, with to described first dispatch application assignment profile formula lock, only described first dispatch application can be executed the task; And
Processing unit, is configured to, when described first dispatch application obtains the distributed lock distributed, utilize described first dispatch application to perform corresponding task.
Preferably, described allocation units are further configured to according to the first dispatch application described in fifo fifo sequence call.
Preferably, described device also comprises: nullify unit, is configured to, when described first dispatch application occurs abnormal, nullify described first dispatch application and exit described distributed queue to make described first dispatch application.
Preferably, described allocation units are further configured to: after described first dispatch application exits described distributed queue, call the follow-up dispatch application in multiple dispatch application of registration, with to described follow-up dispatch application assignment profile formula lock, only described follow-up dispatch application can be executed the task; And
Described processing unit is further configured to: when described follow-up dispatch application obtains the distributed lock distributed, utilize described follow-up dispatch application to perform corresponding task.
Preferably, described allocation units are further configured to according to follow-up dispatch application described in fifo fifo sequence call.
Preferably, described multiple dispatch application is Quartz dispatch application.
In another aspect of the present invention, disclose a kind of device for realizing distributed scheduling based on zookeeper, comprising:
Registering unit, is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center;
Processing unit, is configured to call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with described first dispatch application; And
Sequencing unit, is configured to, after described first dispatch application performs corresponding task, described first dispatch application is aligned to the afterbody of described distributed queue.
Preferably, described processing unit is further configured to according to the first dispatch application described in fifo fifo sequence call.
Preferably, described processing unit is further configured to: after described first dispatch application is aligned to the afterbody of described distributed queue, calls follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with described follow-up dispatch application; And
Described sequencing unit is further configured to: after continuous dispatch application performs corresponding task in the rear, described follow-up dispatch application is aligned to the afterbody of described distributed queue.
Preferably, described processing unit is further configured to according to follow-up dispatch application described in fifo fifo sequence call.
Preferably, described multiple dispatch application is Quartz dispatch application.
In the scheme that the present invention proposes, zookeeper alternate data storehouse is utilized to carry out the execution of the Quartz single-point application of control realization single-point task scheduling to realize distributed scheduling, achieve and a kind ofly can meet timer-triggered scheduler task, the Scheduling Framework that multitask performs simultaneously can be met again, make the use of distributed scheduling more flexibly, convenient.
Accompanying drawing explanation
According in conjunction with the following description of exemplary drawings to exemplary embodiment, other details of the present disclosure, aspect and advantage will become apparent, in the accompanying drawings:
Fig. 1 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the framework of the zookeeper registration center of distributed scheduling based on zookeeper;
Fig. 2 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the method for distributed scheduling based on zookeeper;
Fig. 3 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the device of distributed scheduling based on zookeeper;
Fig. 4 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the other method of distributed scheduling based on zookeeper;
Fig. 5 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of another device of distributed scheduling based on zookeeper;
Fig. 6 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the another method of distributed scheduling based on zookeeper;
Fig. 7 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the another device of distributed scheduling based on zookeeper; And
Fig. 8 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the system of distributed scheduling based on zookeeper.
Accompanying drawing does not show all circuit of embodiment or structure.The Reference numeral running through institute's drawings attached identical represents same or analogous parts or feature.
Embodiment
To specific embodiments of the invention be described in detail below, it should be noted that the embodiments described herein is only for illustrating, is not limited to the present invention.In the following description, in order to provide thorough understanding of the present invention, a large amount of specific detail has been set forth.But, those of ordinary skill in the art be it is evident that: these specific detail need not be adopted to carry out the present invention.In other instances, in order to avoid obscuring the present invention, do not specifically describe known circuit, material or method.
In whole instructions, " embodiment ", " embodiment ", " example " or mentioning of " example " are meaned: the special characteristic, structure or the characteristic that describe in conjunction with this embodiment or example are at least one embodiment of the invention involved.Therefore, the phrase " in one embodiment " occurred in each place of whole instructions, " in an embodiment ", " example " or " example " differ to establish a capital and refer to same embodiment or example.In addition, can with any suitable combination and/or sub-portfolio by specific feature, structure or property combination in one or more embodiment or example.In addition, it should be understood by one skilled in the art that the accompanying drawing provided at this is all for illustrative purposes, and accompanying drawing is not necessarily drawn in proportion.Term "and/or" used herein comprises any and all combinations of one or more relevant project listed.
First, the schematic diagram being used for the framework realizing the zookeeper registration center of distributed scheduling based on zookeeper according to embodiments of the invention is described with reference to Fig. 1.As shown in Figure 1, the framework for realizing distributed scheduling based on zookeeper comprises zookeeper cluster of servers 110, distributed lock 120, distributed queue 130 and notice/coordination unit 140.Zookeeper cluster of servers 110 applies for a unified NameSpace, for controlling all client application (that is, dispatch application) under this NameSpace.Zookeeper registration center has multiple zookeeper node, and each node corresponds to a client application.Distributed lock 120 has exclusivity, in other words, all attempt to obtain in client application of this lock only have a client application successfully can obtain this lock.The client application having this lock realizes the task call of single-point, and other client application cannot be executed the task and be called.When the client corresponding to the client application having this lock delays machine, go to attempt to obtain by there being a new client application and have this lock, then continuing operation dispatching task, the security of guarantee system.Distributed queue 130 has the characteristic of first in first out (FIFO), in other words, all dispatch application are all registered in distributed queue, call these dispatch application successively according to the principle of first in first out, call a dispatch application dequeue to execute the task at every turn.After performing task, the dispatch application called can be aligned to the afterbody of queue again, waits for next time and calls, thus realize the object of dispatch application load balancing.Notice/coordination unit 140 notifies that all chartered multiple dispatch application are executed the task for needing in system when dispatching.Certainly, need to distribute each application data to be processed in advance, that is, to each application configuration data burst.
For realize based on zookeeper distributed scheduling method can fill order's task realizes, multitask realization and load balancing realize.Below, will respectively various realization be described in detail.
Fig. 2 shows the schematic diagram of the single task implementation method for realizing distributed scheduling based on zookeeper.In step 201, in the distributed queue at place of zookeeper registration center, register multiple dispatch application.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).In step 202, call the first dispatch application in multiple dispatch application of registration, with to the first dispatch application assignment profile formula lock, only the first dispatch application can be executed the task.Preferably, the first dispatch application is invoked according to first in first out (FIFO) order.In step 203, when the first dispatch application obtains the distributed lock distributed, the first dispatch application is utilized to perform corresponding task.
When the first dispatch application occur abnormal (such as, the terminal corresponding with the first dispatch application delay machine time) time, the first dispatch application exits distributed queue.After the first dispatch application exits described distributed queue, call the follow-up dispatch application in multiple dispatch application of registration, with to follow-up dispatch application assignment profile formula lock, only follow-up dispatch application can be executed the task.Preferably, follow-up dispatch application is invoked according to first in first out (FIFO) order.When follow-up dispatch application obtains the distributed lock distributed, follow-up dispatch application is utilized to perform corresponding task.
Fig. 3 shows the schematic diagram of the single task implement device 300 for realizing distributed scheduling based on zookeeper.Device 300 comprises registering unit 310, allocation units 320 and processing unit 330.Registering unit 310 is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).Allocation units 320 are configured to the first dispatch application called in multiple dispatch application of registration, with to the first dispatch application assignment profile formula lock, only the first dispatch application can be executed the task.Processing unit 330 is configured to, when the first dispatch application obtains the distributed lock distributed, utilize the first dispatch application to perform corresponding task.Described device 300 also comprises: nullify unit 340, be configured when the first dispatch application occur abnormal (such as, the terminal corresponding with the first dispatch application delay machine time) time, nullify the first dispatch application and exit distributed queue to make the first dispatch application.Then, described allocation units 320 are further configured to after the first dispatch application exits described distributed queue, call the follow-up dispatch application in multiple dispatch application of registration, with to follow-up dispatch application assignment profile formula lock, only follow-up dispatch application can be executed the task.Preferably, follow-up dispatch application is invoked according to first in first out (FIFO) order.Processing unit 330 is further configured to when follow-up dispatch application obtains the distributed lock distributed, and utilizes follow-up dispatch application to perform corresponding task.
Fig. 4 shows the schematic diagram of the multitask implementation method for realizing distributed scheduling based on zookeeper.In step 401, in the multiple dispatch application of place of zookeeper registration center registration.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).In step 402, monitoring with the corresponding Nodes of multiple dispatch application of registration the data that dispatch application performs.In step 403, when a certain Nodes generation task triggers (such as, the data of this Nodes change), notify that every other dispatch application performs corresponding task.In step 404, call all dispatch application and concurrently respective data fragmentation is processed.
Fig. 5 shows the schematic diagram of the multitask implement device 500 for realizing distributed scheduling based on zookeeper.Device 500 comprises registering unit 510, monitoring unit 520, notice/coordination unit 530 and processing unit 540.Registering unit 510 is configured in the multiple dispatch application of place of zookeeper registration center registration.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).Monitoring unit 520 is configured to monitoring with the corresponding Nodes of multiple dispatch application of registration the data that dispatch application performs.Notice/coordination unit 530 is configured to, when a certain Nodes generation task triggers (such as, the data of this Nodes change), notify that every other dispatch application performs corresponding task.Processing unit 540 is configured to call all dispatch application and processes respective data fragmentation concurrently.
Fig. 6 shows the schematic diagram of the implementation of load balancing for realizing distributed scheduling based on zookeeper.In step 610, in the distributed queue at place of zookeeper registration center, register multiple dispatch application.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).In step 620, call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with the first dispatch application.Preferably, the first dispatch application is according to fifo fifo sequence call.In step 630, after the first dispatch application performs corresponding task, the first dispatch application is aligned to the afterbody of distributed queue.
Then, after the afterbody the first dispatch application being aligned to distributed queue, call follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with follow-up dispatch application, and after follow-up dispatch application performs corresponding task, follow-up dispatch application is aligned to the afterbody of distributed queue.Preferably, follow-up dispatch application is also according to fifo fifo sequence call.
Fig. 7 shows the schematic diagram of the load balancing implement device 700 for realizing distributed scheduling based on zookeeper.Device 700 comprises registering unit 710, processing unit 720 and sequencing unit 730.Registering unit 710 is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center.This dispatch application can be Quartz dispatch application.That is, can call dispatch application with a certain timing (such as, every 3 minutes etc.).Processing unit 720 is configured to call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with the first dispatch application.Preferably, the first dispatch application is according to fifo fifo sequence call.Sequencing unit 730 is configured to, after the first dispatch application performs corresponding task, the first dispatch application is aligned to the afterbody of distributed queue.Processing unit 720 is further configured to after the afterbody the first dispatch application being aligned to distributed queue, call follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with follow-up dispatch application, and after follow-up dispatch application performs corresponding task, follow-up dispatch application is aligned to the afterbody of distributed queue.Preferably, follow-up dispatch application is also according to fifo fifo sequence call.
The present invention does not rely on database to realize distributed scheduling task, is applicable to multiple use scenes, realizes timer-triggered scheduler task and multitask and performs to solve data simultaneously and overstock problem, and have stronger extendability and good disaster tolerance effect.In the present invention, utilize the distributed lock of zookeeper to realize single-point scheduling, there is disaster tolerance effect simultaneously; The distributed queue of zookeeper is utilized to realize load balancing; And utilize the notice/coordination function of zookeeper, realize multitask and perform simultaneously.
Fig. 8 schematically illustrates according to embodiments of the invention for realizing the schematic diagram of the system 800 of distributed scheduling based on zookeeper.System 800 comprises processor 810, such as, and digital signal processor (DSP).Processor 810 can be the individual unit of different actions for performing process described herein or multiple unit.System 800 can also comprise I/O (I/O) unit 830, for sending signal from other entity Received signal strength or to other entities.
In addition, system 800 comprises storer 820, and this storer 820 can have following form: non-volatile or volatile memory, such as, and Electrically Erasable Read Only Memory (EEPROM), flash memory etc.Storer 820 stores computer-readable instruction, and when processor 810 performs this computer-readable instruction, this computer-readable instruction makes processor perform action as herein described.
Above detailed description, by using schematic diagram, process flow diagram and/or example, has set forth numerous embodiments of inspection method and system.When this schematic diagram, process flow diagram and/or example comprise one or more function and/or operation, it will be understood by those skilled in the art that each function in this schematic diagram, process flow diagram or example and/or operation can by various structure, hardware, software, firmware or in fact their combination in any come to realize separately and/or jointly.In one embodiment, some parts of theme described in embodiments of the invention can be realized by special IC (ASIC), field programmable gate array (FPGA), digital signal processor (DSP) or other integrated forms.But, those skilled in the art will recognize that, some aspects of embodiment disclosed herein can realize in integrated circuits on the whole or partly equally, be embodied as one or more computer programs of running on one or more computing machine (such as, be embodied as the one or more programs run in one or more computer system), be embodied as one or more programs of running on the one or more processors (such as, be embodied as the one or more programs run on one or more microprocessor), be embodied as firmware, or be embodied as in fact the combination in any of aforesaid way, and those skilled in the art are according to the disclosure, the ability of design circuit and/or write software and/or firmware code will be possessed.In addition, those skilled in the art will recognize that, the mechanism of theme described in the disclosure can be distributed as the program product of various ways, and regardless of the actual particular type of signal bearing medium being used for performing distribution, the exemplary embodiment of theme described in the disclosure is all applicable.The example of signal bearing medium includes but not limited to: recordable-type media, as floppy disk, hard disk drive, compact-disc (CD), digital universal disc (DVD), numerical tape, computer memory etc.; And transmission type media, as numeral and/or analogue communication medium (such as, optical fiber cable, waveguide, wired communications links, wireless communication link etc.).
Although exemplary embodiment describe the present invention with reference to several, should be appreciated that term used illustrates and exemplary and nonrestrictive term.Spirit or the essence of invention is not departed from because the present invention can specifically implement in a variety of forms, so be to be understood that, above-described embodiment is not limited to any aforesaid details, and explain widely in the spirit and scope that should limit in claim of enclosing, therefore fall into whole change in claim or its equivalent scope and remodeling and all should be claim of enclosing and contained.

Claims (22)

1., for realizing a method for distributed scheduling based on zookeeper, comprising:
Multiple dispatch application is registered in the distributed queue at place of zookeeper registration center;
Call the first dispatch application in multiple dispatch application of registration, with to described first dispatch application assignment profile formula lock, only described first dispatch application can be executed the task; And
When described first dispatch application obtains the distributed lock distributed, described first dispatch application is utilized to perform corresponding task.
2. method according to claim 1, wherein, according to the first dispatch application described in fifo fifo sequence call.
3. method according to claim 1, wherein, when described first dispatch application occurs abnormal, described first dispatch application exits described distributed queue.
4. method according to claim 3, wherein, after described first dispatch application exits described distributed queue, described method also comprises:
Call the follow-up dispatch application in multiple dispatch application of registration, with to described follow-up dispatch application assignment profile formula lock, only described follow-up dispatch application can be executed the task; And
When described follow-up dispatch application obtains the distributed lock distributed, described follow-up dispatch application is utilized to perform corresponding task.
5. method according to claim 4, wherein, according to follow-up dispatch application described in fifo fifo sequence call.
6. method according to claim 1, wherein, described multiple dispatch application is Quartz dispatch application.
7., for realizing a method for distributed scheduling based on zookeeper, comprising:
Multiple dispatch application is registered in the distributed queue at place of zookeeper registration center;
Call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with described first dispatch application; And
After described first dispatch application performs corresponding task, described first dispatch application is aligned to the afterbody of described distributed queue.
8. method according to claim 7, wherein, according to the first dispatch application described in fifo fifo sequence call.
9. method according to claim 7, wherein, after described first dispatch application is aligned to the afterbody of described distributed queue, described method also comprises:
Call follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with described follow-up dispatch application; And
After continuous dispatch application performs corresponding task in the rear, described follow-up dispatch application is aligned to the afterbody of described distributed queue.
10. method according to claim 9, wherein, according to follow-up dispatch application described in fifo fifo sequence call.
11. methods according to claim 7, wherein, described multiple dispatch application is Quartz dispatch application.
12. 1 kinds, for realizing the device of distributed scheduling based on zookeeper, comprising:
Registering unit, is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center;
Allocation units, are configured to the first dispatch application called in multiple dispatch application of registration, with to described first dispatch application assignment profile formula lock, only described first dispatch application can be executed the task; And
Processing unit, is configured to, when described first dispatch application obtains the distributed lock distributed, utilize described first dispatch application to perform corresponding task.
13. devices according to claim 12, wherein, described allocation units are further configured to according to the first dispatch application described in fifo fifo sequence call.
14. devices according to claim 12, also comprise: nullify unit, are configured to, when described first dispatch application occurs abnormal, nullify described first dispatch application and exit described distributed queue to make described first dispatch application.
15. devices according to claim 14, wherein, described allocation units are further configured to: after described first dispatch application exits described distributed queue, call the follow-up dispatch application in multiple dispatch application of registration, with to described follow-up dispatch application assignment profile formula lock, only described follow-up dispatch application can be executed the task; And
Described processing unit is further configured to: when described follow-up dispatch application obtains the distributed lock distributed, utilize described follow-up dispatch application to perform corresponding task.
16. devices according to claim 15, wherein, described allocation units are further configured to according to follow-up dispatch application described in fifo fifo sequence call.
17. devices according to claim 12, wherein, described multiple dispatch application is Quartz dispatch application.
18. 1 kinds, for realizing the device of distributed scheduling based on zookeeper, comprising:
Registering unit, is configured to register multiple dispatch application in the distributed queue at place of zookeeper registration center;
Processing unit, is configured to call the first dispatch application in multiple dispatch application of registration to perform the task corresponding with described first dispatch application; And
Sequencing unit, is configured to, after described first dispatch application performs corresponding task, described first dispatch application is aligned to the afterbody of described distributed queue.
19. devices according to claim 18, wherein, described processing unit is further configured to according to the first dispatch application described in fifo fifo sequence call.
20. devices according to claim 18, wherein, described processing unit is further configured to: after described first dispatch application is aligned to the afterbody of described distributed queue, calls follow-up dispatch application in multiple dispatch application of registration to perform the task corresponding with described follow-up dispatch application; And
Described sequencing unit is further configured to: after continuous dispatch application performs corresponding task in the rear, described follow-up dispatch application is aligned to the afterbody of described distributed queue.
21. devices according to claim 20, wherein, described processing unit is further configured to according to follow-up dispatch application described in fifo fifo sequence call.
22. devices according to claim 18, wherein, described multiple dispatch application is Quartz dispatch application.
CN201510561242.2A 2015-09-06 2015-09-06 Method and apparatus for realizing distributed scheduling based on zookeeper Active CN105159767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510561242.2A CN105159767B (en) 2015-09-06 2015-09-06 Method and apparatus for realizing distributed scheduling based on zookeeper

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510561242.2A CN105159767B (en) 2015-09-06 2015-09-06 Method and apparatus for realizing distributed scheduling based on zookeeper

Publications (2)

Publication Number Publication Date
CN105159767A true CN105159767A (en) 2015-12-16
CN105159767B CN105159767B (en) 2019-07-02

Family

ID=54800630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510561242.2A Active CN105159767B (en) 2015-09-06 2015-09-06 Method and apparatus for realizing distributed scheduling based on zookeeper

Country Status (1)

Country Link
CN (1) CN105159767B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610972A (en) * 2016-02-01 2016-05-25 中博信息技术研究院有限公司 Clustered task dispatching system
CN105677468A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Cache and designing method thereof and scheduling method and scheduling device using cache
CN105959390A (en) * 2016-06-13 2016-09-21 乐视控股(北京)有限公司 Unified management system and method of micro services
CN106412123A (en) * 2016-11-28 2017-02-15 上海斐讯数据通信技术有限公司 Distributed terminal equipment information processing method and system of cloud access controller
CN106484530A (en) * 2016-09-05 2017-03-08 努比亚技术有限公司 A kind of distributed task dispatching O&M monitoring system and method
CN106874090A (en) * 2017-01-23 2017-06-20 北京思特奇信息技术股份有限公司 Job scheduling method and system based on cloud system
CN107092521A (en) * 2016-12-30 2017-08-25 北京小度信息科技有限公司 A kind of distributed task dispatching method, apparatus and system
CN107181789A (en) * 2017-03-31 2017-09-19 北京奇艺世纪科技有限公司 A kind of distributed lock implementation method and device
CN107203429A (en) * 2016-03-18 2017-09-26 阿里巴巴集团控股有限公司 A kind of method and device that distributed task scheduling is loaded based on distributed lock
CN107370773A (en) * 2016-05-11 2017-11-21 北京京东尚科信息技术有限公司 The method and system of the telescopic distributed data filing of High Availabitity
CN107423121A (en) * 2017-05-02 2017-12-01 千寻位置网络有限公司 The scheduling system and method for GNSS precision post processing tasks
CN108255592A (en) * 2017-12-19 2018-07-06 武汉市烽视威科技有限公司 A kind of Quartz clusters timing task processing system and method
CN108762910A (en) * 2018-06-06 2018-11-06 亚信科技(中国)有限公司 A kind of distributed task dispatching method and system
CN109684051A (en) * 2018-12-17 2019-04-26 杭州玳数科技有限公司 A kind of method and system of the hybrid asynchronous submission of big data task
CN109814998A (en) * 2019-01-22 2019-05-28 中国联合网络通信集团有限公司 A kind of method and device of multi-process task schedule
CN111163117A (en) * 2018-11-07 2020-05-15 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN112118291A (en) * 2020-08-13 2020-12-22 北京思特奇信息技术股份有限公司 Load balancing system and method for service flow
CN112527489A (en) * 2020-12-22 2021-03-19 税友软件集团股份有限公司 Task scheduling method, device and equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997498A (en) * 2014-05-27 2014-08-20 北京京东尚科信息技术有限公司 Distributed lock service implementation method and component
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof
WO2015078498A1 (en) * 2013-11-27 2015-06-04 Huawei Technologies Co., Ltd. Method and system for balancing load in a sdn network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015078498A1 (en) * 2013-11-27 2015-06-04 Huawei Technologies Co., Ltd. Method and system for balancing load in a sdn network
CN103997498A (en) * 2014-05-27 2014-08-20 北京京东尚科信息技术有限公司 Distributed lock service implementation method and component
CN104092767A (en) * 2014-07-21 2014-10-08 北京邮电大学 Posting/subscribing system for adding message queue models and working method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘芬,王芳,田昊: "基于Zookeeper的分布式锁服务及性能优化", 《计算机研究与发展》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677468A (en) * 2016-01-06 2016-06-15 北京京东尚科信息技术有限公司 Cache and designing method thereof and scheduling method and scheduling device using cache
CN105610972A (en) * 2016-02-01 2016-05-25 中博信息技术研究院有限公司 Clustered task dispatching system
CN105610972B (en) * 2016-02-01 2019-04-09 中博信息技术研究院有限公司 The task of concentrating type sends system
CN107203429A (en) * 2016-03-18 2017-09-26 阿里巴巴集团控股有限公司 A kind of method and device that distributed task scheduling is loaded based on distributed lock
CN107370773A (en) * 2016-05-11 2017-11-21 北京京东尚科信息技术有限公司 The method and system of the telescopic distributed data filing of High Availabitity
CN105959390A (en) * 2016-06-13 2016-09-21 乐视控股(北京)有限公司 Unified management system and method of micro services
CN106484530A (en) * 2016-09-05 2017-03-08 努比亚技术有限公司 A kind of distributed task dispatching O&M monitoring system and method
CN106412123A (en) * 2016-11-28 2017-02-15 上海斐讯数据通信技术有限公司 Distributed terminal equipment information processing method and system of cloud access controller
CN107092521B (en) * 2016-12-30 2020-11-10 北京星选科技有限公司 Distributed task scheduling method, device and system
CN107092521A (en) * 2016-12-30 2017-08-25 北京小度信息科技有限公司 A kind of distributed task dispatching method, apparatus and system
CN106874090A (en) * 2017-01-23 2017-06-20 北京思特奇信息技术股份有限公司 Job scheduling method and system based on cloud system
CN107181789A (en) * 2017-03-31 2017-09-19 北京奇艺世纪科技有限公司 A kind of distributed lock implementation method and device
CN107423121B (en) * 2017-05-02 2020-12-01 千寻位置网络有限公司 Scheduling system and method of GNSS precision post-processing task
CN107423121A (en) * 2017-05-02 2017-12-01 千寻位置网络有限公司 The scheduling system and method for GNSS precision post processing tasks
CN108255592A (en) * 2017-12-19 2018-07-06 武汉市烽视威科技有限公司 A kind of Quartz clusters timing task processing system and method
CN108255592B (en) * 2017-12-19 2020-12-08 武汉市烽视威科技有限公司 Quartz cluster timing task processing system and method
CN108762910A (en) * 2018-06-06 2018-11-06 亚信科技(中国)有限公司 A kind of distributed task dispatching method and system
CN111163117B (en) * 2018-11-07 2023-01-31 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN111163117A (en) * 2018-11-07 2020-05-15 北京京东尚科信息技术有限公司 Zookeeper-based peer-to-peer scheduling method and device
CN109684051B (en) * 2018-12-17 2020-08-11 杭州玳数科技有限公司 Method and system for asynchronously submitting hybrid big data task
CN109684051A (en) * 2018-12-17 2019-04-26 杭州玳数科技有限公司 A kind of method and system of the hybrid asynchronous submission of big data task
CN109814998A (en) * 2019-01-22 2019-05-28 中国联合网络通信集团有限公司 A kind of method and device of multi-process task schedule
CN112118291A (en) * 2020-08-13 2020-12-22 北京思特奇信息技术股份有限公司 Load balancing system and method for service flow
CN112118291B (en) * 2020-08-13 2022-11-18 北京思特奇信息技术股份有限公司 Load balancing system and method for service flow
CN112527489A (en) * 2020-12-22 2021-03-19 税友软件集团股份有限公司 Task scheduling method, device and equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN105159767B (en) 2019-07-02

Similar Documents

Publication Publication Date Title
CN105159767A (en) Method and device for realizing distributed scheduling on the basis of zookeeper
US9497288B2 (en) Subscriber based priority of messages in a publisher-subscriber domain
CN103679392B (en) A kind of task scheduling processing method and system
CN111897633A (en) Task processing method and device
US9280388B2 (en) Method and apparatus for efficient scheduling of multithreaded programs
US9535749B2 (en) Methods for managing work load bursts and devices thereof
CN111459645B (en) Task scheduling method and device and electronic equipment
CN103763346A (en) Distributed resource scheduling method and device
WO2023174037A1 (en) Resource scheduling method, apparatus and system, device, medium, and program product
US20220188156A1 (en) Method and apparatus for determining hardware usage, storage medium, and electronic device
CN109388501B (en) Communication matching method, device, equipment and medium based on face recognition request
CN112860401B (en) Task scheduling method, device, electronic equipment and storage medium
CN112948081A (en) Method, device and equipment for processing task in delayed mode and storage medium
CN113760522A (en) Task processing method and device
CN109086128B (en) Task scheduling method and device
CN111158896A (en) Distributed process scheduling method and system
CN114816703A (en) Task processing method, device, equipment and medium
CN113806050A (en) Processing method and device of computing resources, electronic equipment and storage medium
CN113849160A (en) Dynamic migration method and device for compiling task, electronic equipment and storage medium
CN110018906B (en) Scheduling method, server and scheduling system
CN113377360A (en) Task execution method, device, electronic equipment, storage medium and program product
CN112446754A (en) Method and device for processing orders
CN115480954A (en) Method, apparatus and program product for managing data backup
CN111698132B (en) Method, apparatus, device and medium for controlling heartbeat events in a cluster
CN113760973A (en) Method and apparatus for performing data operations on real-time data streams and data sets

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant