CN109725999A - A kind of management method and device of scheduling process - Google Patents

A kind of management method and device of scheduling process Download PDF

Info

Publication number
CN109725999A
CN109725999A CN201811600954.0A CN201811600954A CN109725999A CN 109725999 A CN109725999 A CN 109725999A CN 201811600954 A CN201811600954 A CN 201811600954A CN 109725999 A CN109725999 A CN 109725999A
Authority
CN
China
Prior art keywords
scheduling process
heartbeat
dual system
cluster manager
manager dual
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.)
Pending
Application number
CN201811600954.0A
Other languages
Chinese (zh)
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.)
Asiainfo Technologies China Inc
Original Assignee
Asiainfo Technologies China Inc
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 Asiainfo Technologies China Inc filed Critical Asiainfo Technologies China Inc
Priority to CN201811600954.0A priority Critical patent/CN109725999A/en
Publication of CN109725999A publication Critical patent/CN109725999A/en
Pending legal-status Critical Current

Links

Landscapes

  • Hardware Redundancy (AREA)

Abstract

The present invention provides the management method and device of a kind of scheduling process, is applied to cluster manager dual system, and the identity for the scheduling process that the cluster manager dual system connect with multiple scheduling processes, and each connect with cluster manager dual system is stored in cluster manager dual system;Method includes: the heartbeat registion time according to the first scheduling process the last time saved in cluster manager dual system, is judged in preset first time interval, if receives the heartbeat message of the first scheduling process transmission;When the heartbeat message for judging to receive the transmission of the first scheduling process in preset first time interval, it is determined that the first scheduling process is available, and saves the heartbeat registion time for receiving the heartbeat message of the first scheduling process transmission;Otherwise, it determines the first scheduling process is unavailable.The present invention provides a kind of cluster management schemes of scheduling process, can share different task in multiple and different scheduling processes and execute, greatly improve the execution efficiency of scheduler task.

Description

A kind of management method and device of scheduling process
Technical field
The present invention relates to mobile service support and business support system design etc. technical fields more particularly to it is a kind of dispatch into The management method and device of journey.
Background technique
In task scheduling field, it is currently based upon one process manage and dispatch task, i.e., is completed by a scheduling process all The execution efficiency of the scheduling of task, scheduler task is lower.
Summary of the invention
In view of this, the present invention provides the management method and device of a kind of scheduling process, for providing a kind of scheduling process Cluster management scheme, different task can be shared in multiple and different scheduling processes and be executed, so as to improve scheduler task Execution efficiency.Technical solution is as follows:
Based on an aspect of of the present present invention, the present invention provides a kind of management method of scheduling process, is applied to cluster manager dual system, The cluster manager dual system is connect with multiple scheduling processes, and the identity mark for the scheduling process each connecting with the cluster manager dual system Knowledge is stored in the cluster manager dual system;Method includes:
According to the heartbeat registion time of the first scheduling process the last time saved in the cluster manager dual system, judge pre- If first time interval in, if receive the heartbeat message that the first scheduling process is sent;The wherein heartbeat message Identity including the first scheduling process, it is corresponding that the first time interval with described first dispatches process, and described the One scheduling process is any one in the scheduling process connecting with the cluster manager dual system;
When the heartbeat message for judging to receive the first scheduling process transmission in preset first time interval, then It determines that the first scheduling process is available, and saves the heartbeat registration for receiving the heartbeat message that the first scheduling process is sent Time;
Disappear when judging to be not received by the heartbeat that the first scheduling process is sent in preset first time interval Breath, it is determined that the first scheduling process is unavailable.
Optionally, the method also includes:
When determining that the first scheduling process is unavailable, judge whether the first scheduling process currently appoints in execution Business;
If the task that the first scheduling process executes withdrawn, and the task is divided again in the task of execution It issues and currently has determined that the second available, idle scheduling process, so that the second scheduling process re-executes described appoint Business;Wherein the second scheduling process is any one in the scheduling process connecting with the cluster manager dual system.
Optionally, the heartbeat registion time according to the first scheduling process the last time saved in the cluster manager dual system, Judge in preset first time interval, if receiving the heartbeat message that the first scheduling process is sent includes:
Obtain current time, and the current time is subtracted described first saved in the cluster manager dual system dispatch into The heartbeat registion time of journey the last time, obtains heartbeat time interval;
Judge within time of the heartbeat time interval no more than the preset first time interval, if receive The heartbeat message that the first scheduling process is sent;
Or, the heartbeat registion time according to the first scheduling process the last time saved in the cluster manager dual system, judgement In preset first time interval, if receiving the heartbeat message that the first scheduling process is sent includes:
According to the heartbeat registion time of the first scheduling process the last time saved in the cluster manager dual system and described One time interval calculates the deadline that the first scheduling process sends heartbeat message;
Judge when reaching the deadline or before reaching, if receive the heart that the first scheduling process is sent Jump message.
Optionally, the cluster manager dual system stores the identity of each scheduling process by the way of it can use scheduling process list Mark.
Optionally, the method also includes:
Disappear when the heartbeat message for receiving third scheduling process transmission, and according to the heartbeat that third scheduling process is sent Identity in breath, when judging the not stored identity for having the third scheduling process in the cluster manager dual system, storage The identity of the third scheduling process, to complete registration of the third scheduling process in the cluster manager dual system, with And the heartbeat registion time for receiving the heartbeat message that the third scheduling process is sent is saved, and be arranged and dispatch with the third The corresponding third time interval of process.
Based on another aspect of the present invention, the present invention provides a kind of managing device of scheduling process, is applied to cluster management Device, the body for the scheduling process that the cluster manager dual system connect with multiple scheduling processes, and each connect with the cluster manager dual system Part mark is stored in the cluster manager dual system;Device includes:
First judging unit, for the heartbeat according to the first scheduling process the last time saved in the cluster manager dual system Registion time judges in preset first time interval, if receives the heartbeat message that the first scheduling process is sent; Wherein the heartbeat message includes the identity of the first scheduling process, the first time interval and first scheduling Process is corresponding, and the first scheduling process is any one in the scheduling process connecting with the cluster manager dual system;
First processing units, for judging to receive in preset first time interval in first judging unit It when the heartbeat message that the first scheduling process is sent, determines that the first scheduling process is available, and saves and receive described the The heartbeat registion time for the heartbeat message that one scheduling process is sent;
The second processing unit, for judging not connect in preset first time interval in first judging unit When receiving the heartbeat message that the first scheduling process is sent, determine that the first scheduling process is unavailable.
Optionally, described device further include:
Second judgment unit, for judging when described the second processing unit determines that the first scheduling process is unavailable Whether the first scheduling process is currently in the task of execution;
Task reassigns unit, for judging that the first scheduling process is currently appointed in execution in the second judgment unit When business, the task that the first scheduling process executes is withdrawn, and the task is redistributed to currently have determined that it is available, The second idle scheduling process, so that the second scheduling process re-executes the task;Wherein described second dispatch into Cluster manager dual system described in Cheng Weiyu connection scheduling process in any one.
Optionally, first judging unit is specifically used for, and obtains current time, and the current time is subtracted described The heartbeat registion time of the described first scheduling process the last time saved in cluster manager dual system, obtains heartbeat time interval;Sentence Break within time of the heartbeat time interval no more than the preset first time interval, if receive described first and adjust The heartbeat message that degree process is sent;
Or, first judging unit is specifically used for, most according to the first scheduling process saved in the cluster manager dual system Nearly primary heartbeat registion time and the first time interval calculate the cut-off that the first scheduling process sends heartbeat message Time;Judge when reaching the deadline or before reaching, if receive the heartbeat that the first scheduling process is sent Message.
Optionally, the cluster manager dual system stores the identity of each scheduling process by the way of it can use scheduling process list Mark.
Optionally, described device further include:
Third judging unit, for receive third scheduling process send heartbeat message, and according to the third dispatch into The identity in heartbeat message that journey is sent judges the third scheduling process whether is stored in the cluster manager dual system Identity;
Third processing unit, for judging not stored in the cluster manager dual system there is described in the third judging unit When the identity of three scheduling processes, the identity of the third scheduling process is stored, to complete the third scheduling process Registration in the cluster manager dual system, and save the heartbeat note for receiving the heartbeat message that the third scheduling process is sent The volume time, and third time interval corresponding with third scheduling process is set.
In the management method and device of scheduling process provided by the invention, multiple scheduling processes are connect with cluster manager dual system, And the identity for each scheduling process being attached thereto is stored in cluster manager dual system.Cluster manager dual system passes through according to cluster pipe The heartbeat registion time of each scheduling process the last time that is saved in reason device and with each scheduling process be correspondingly arranged when Between be spaced, judge in preset time interval, if receive the heartbeat message of corresponding scheduling progress feedback.With arbitrary For first scheduling process, the present invention then specifically judges in preset first time interval, if receives described first and adjusts The heartbeat message that degree process is sent.If it is determined that receiving the first scheduling process hair in preset first time interval The heartbeat message sent, it is determined that the first scheduling process is available, and saves and receive the heart that the first scheduling process is sent Jump the heartbeat registion time of message.At this time if any task, the first scheduling process can be assigned the task to and go to execute.And if sentenced Break in preset first time interval, is not received by the heartbeat message that the first scheduling process is sent, it is determined that described First scheduling process is unavailable, hereafter no longer distributes task for it.The present invention by cluster manager dual system construct one dispatch into The cluster management scheme of journey detects the availability of each scheduling process by cluster manager dual system timing, can be by different task point It spreads out and is executed in multiple and different, available scheduling process, substantially increase the execution efficiency of scheduler task.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of cluster management system structural schematic diagram of scheduling process provided by the invention;
Fig. 2 is a kind of flow chart of the management method of scheduling process provided by the invention;
Fig. 3 is a kind of structural schematic diagram of the managing device of scheduling process provided by the invention;
Fig. 4 is the structural schematic diagram of the managing device of another scheduling process provided by the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In view of being all at present by one process manage and dispatch task, no scheduling process group scheme, the present invention, which innovates, to be proposed A kind of cluster management scheme of scheduling process, different task can be shared in multiple and different scheduling processes and be executed, with this Improve the execution efficiency of scheduler task.Specifically as shown in Figure 1, the management method of scheduling process provided by the invention is applied to cluster Manager, the identity for the scheduling process which connect with multiple scheduling processes, and each connect with cluster manager dual system Mark is stored in the cluster manager dual system.
The identity of process is wherein dispatched for example including the instance number etc. of scheduling process.
As shown in Fig. 2, the management method of scheduling process provided by the invention may include:
Step 101, the heartbeat registion time according to the first scheduling process the last time saved in the cluster manager dual system, Judge in preset first time interval, if receive the heartbeat message that the first scheduling process is sent.If received It arrives, executes step 102, if be not received by, execute step 103.
Wherein, the heartbeat message includes the identity of the first scheduling process, the first time interval and institute It is corresponding to state the first scheduling process, the first scheduling process is any one in the scheduling process connecting with the cluster manager dual system It is a.
In the present invention, the scheduling process each connecting with cluster manager dual system completes note in cluster manager dual system Volume, identity are stored in cluster manager dual system.Preferably, the present invention can setting can use tune in cluster manager dual system in advance Process list is spent, the identity of each scheduling process is stored in the available scheduling process list.In this way, cluster manager dual system Each scheduling state of a process can be successively inquired, facilitates cluster manager dual system to each according to the available scheduling process list The management of scheduling process.
For each scheduling process for completing registration, cluster manager dual system can all set corresponding scheduling process after the completion of registration Time interval, after completing registration in cluster manager dual system such as the first scheduling process, cluster manager dual system is set for the first scheduling process Set corresponding first time interval;Similarly, the second scheduling process is completed in cluster manager dual system after registering, cluster manager dual system the Corresponding second time interval is arranged in two scheduling processes.In the present invention, each scheduling process is correspondingly arranged on time interval, and The time interval that each scheduling process is correspondingly arranged may be the same or different.In the present invention optionally, time interval is for example It can be 15 seconds, 30 seconds, 50 seconds etc., the present invention no longer limits this.
In the present invention, by taking the corresponding first time interval of the first scheduling process is 30 seconds as an example, the first scheduling in the present invention Process can send a heartbeat to cluster manager dual system again after 30 seconds and disappear after sending a heartbeat message to cluster manager dual system Breath.
For cluster manager dual system, cluster manager dual system will record and save what the scheduling process received was sent each time The time (for ease of description, which is referred to as heartbeat registion time by the present invention) of heartbeat message, and the heartbeat is registered Time replaces the last (i.e. newest) heartbeat registion time that cluster manager dual system has saved before, that is to say, that collection When what group's manager saved is all the heartbeat registration of the heartbeat message sent recently received scheduling process the last time forever Between.
Wherein, for completing the scheduling process of registration in cluster manager dual system for the first time, cluster manager dual system is directly saved Receive the heartbeat registion time of the heartbeat message of scheduling process transmission.
For ease of description, for the present invention by taking the first scheduling process as an example, which is to connect with cluster manager dual system Any one in the scheduling process connect, it is the last that the present invention is first depending on the first scheduling process saved in cluster manager dual system Heartbeat registion time, judge in preset first time interval, if receive the heart that the first scheduling process is sent Jump message.
Specifically, step 101 of the present invention can be realized using the following two kinds method.
Method one: obtaining current time, and the current time is subtracted to described the saved in the cluster manager dual system The heartbeat registion time of one scheduling process the last time, obtains heartbeat time interval;Judge little in the heartbeat time interval In in the time of the preset first time interval, if receive the heartbeat message that the first scheduling process is sent.
Specific for example, it is assumed that current time is 40 minutes and 0 second 19 points of on December 25th, 2018, saved in cluster manager dual system The heartbeat registion time of one scheduling process the last time is 39 minutes and 50 seconds 19 points of on December 25th, 2018, between preset first time It is divided into 30 seconds.So current time " on December 25th, 2,018 0 second 40 minutes " is subtracted into first saved in cluster manager dual system at 19 points The heartbeat registion time " on December 25th, 2,018 19: 50 39: " of scheduling process the last time, obtains heartbeat time interval 10 Second, and then judge whether heartbeat time interval 10 seconds be not more than preset first time interval 30 seconds.Obvious heartbeat time interval It is not more than within 10 seconds preset first time interval 30 seconds, at this time if receiving the heartbeat message of the first scheduling process transmission, Step 102 is executed, and if being not received by the heartbeat message of the first scheduling process transmission, when continuing to obtain current again Between, and the current time for continuing to get again subtracts the heart of the first scheduling process the last time saved in cluster manager dual system Registion time is jumped, obtains a heartbeat time interval again, and continues to judge in the heartbeat time interval no more than preset In the time of first time interval, if receive the heartbeat message of the first scheduling process transmission.
It is further assumed that if current time is " on December 25th, 2,018 19: 21 40: ", by current time " 2018 When the heartbeat that 40 minutes and 21 seconds 19 points of on December 25, " subtracts first scheduling process the last time saved in cluster manager dual system is registered Between " on December 25th, 2,018 19: 50 39: ", obtain heartbeat time interval 31 seconds, and then judge to learn heartbeat time interval It is greater than preset first time interval 30 seconds within 31 seconds, can directly executes step 103 at this time, determine that the first scheduling process can not With.
Method two: according to the first scheduling process the last time saved in the cluster manager dual system heartbeat registion time and The first time interval calculates the deadline that the first scheduling process sends heartbeat message;Judge in the cut-off Between when reaching or before reaching, if receive the heartbeat message that the first scheduling process is sent.
Specific for example, it is assumed that current time is 40 minutes and 0 second 19 points of on December 25th, 2018, saved in cluster manager dual system The heartbeat registion time of one scheduling process the last time is 39 minutes and 50 seconds 19 points of on December 25th, 2018, between preset first time It is divided into 30 seconds.Heartbeat registion time " 2018 of the present invention according to the first scheduling process the last time saved in cluster manager dual system 39 minutes and 50 seconds 19 points of on December 25, " and preset first time interval 30 seconds, the transmission heartbeat of the first scheduling process is calculated The deadline of message is " on December 25th, 2,018 19: 20 40: ".The present invention judges at deadline " 2018 as a result, When 40 minutes and 20 seconds 19 points of December 25 " reaches or before reaching, if receive the heartbeat message of the first scheduling process transmission.Such as Fruit receives, and thens follow the steps 102, if be not received by, thens follow the steps 103.
Step 102, it determines that the first scheduling process is available, and saves and receive the heart that the first scheduling process is sent Jump the heartbeat registion time of message.
For the present invention after the first scheduling process that determines is available, cluster manager dual system, which can obtain, receives the first scheduling process hair The heartbeat registion time of the heartbeat message sent, and protected before the heartbeat registion time currently got is updated out cluster manager dual system The heartbeat registion time for the first scheduling process deposited.
At this time if the first scheduling process is in idle condition, and currently there is task to need to be implemented, then cluster manager dual system can It goes to execute so that currently needing to be implemented for task is sent to the first scheduling process.
Step 103, determine that the first scheduling process is unavailable.
The present invention can control the first scheduling process and exit and cluster management after determining that the first scheduling process is unavailable The connection of device, while the identity of the store in cluster manager dual system first scheduling process being deleted.It and preferably, can be with Outputting alarm information, to open the effect alerted in time.
As the present invention it is further preferred that the present invention is when step 103 determines that the first scheduling process is unavailable, side Whether method can also include: to judge the first scheduling process currently in execution task;
If the task that the first scheduling process executes withdrawn, and the task is divided again in the task of execution It issues and currently has determined that the second available, idle scheduling process, so that the second scheduling process re-executes described appoint Business;Wherein the second scheduling process is any one in the scheduling process connecting with the cluster manager dual system.
In the present invention, if it is determined that first scheduling process it is unavailable, then judge the first scheduling process currently whether Execution task.If being not carried out task, the first scheduling process can be directly controlled and exit connection with cluster manager dual system, And if, in order to guarantee the execution of task, the present invention can withdraw the task that the first scheduling process executes in the task of execution, And the task is redistributed to and currently has determined that the second available, idle scheduling process, so that the second scheduling process weight It is new to execute task, guarantee the execution of task.
On the basis of the above embodiment of the present invention, scheduling process management method provided by the invention can also include scheduling The process that process is registered for the first time.
By taking third scheduling process as an example, which dispatches process and sends heartbeat message, the heartbeat message to cluster manager dual system In comprising third scheduling process identity.The present invention judges in cluster manager dual system according to the identity of third scheduling process Whether the identity of third scheduling process is stored with, if so, illustrating that third scheduling process is completed in cluster manager dual system Registration, obtain the heartbeat registion time for receiving the heartbeat message that third scheduling process is sent at this time, and the heartbeat registered Time replaces the heartbeat registion time of the third scheduling process saved in cluster manager dual system.
And if according to third scheduling process identity judge in cluster manager dual system it is not stored have third scheduling process Identity, then illustrate third scheduling process be new registration dispatch process, at this time store third scheduling process identity, To complete registration of the third scheduling process in cluster manager dual system, and save to receive the heartbeat message that third scheduling process is sent Heartbeat registion time, and be arranged with the corresponding third time interval of third scheduling process, such as 30 seconds.
In the management method of scheduling process provided by the invention, multiple scheduling processes are connect with cluster manager dual system, and cluster The identity for each scheduling process being attached thereto is stored in manager.Cluster manager dual system passes through according in cluster manager dual system The heartbeat registion time of each scheduling process the last time saved and the time interval being correspondingly arranged with each scheduling process, Judge in preset time interval, if receive the heartbeat message of corresponding scheduling progress feedback.It is adjusted with arbitrary first For degree process, the present invention then specifically judges in preset first time interval, if receives the first scheduling process The heartbeat message of transmission.If it is determined that receiving the heart that the first scheduling process is sent in preset first time interval Jump message, it is determined that the first scheduling process is available, and saves and receive the heartbeat message that the first scheduling process is sent Heartbeat registion time.At this time if there is pending task, the first scheduling process can be assigned the task to and go to execute.And such as Fruit judges to be not received by the heartbeat message that the first scheduling process is sent in preset first time interval, it is determined that The first scheduling process is unavailable, hereafter no longer distributes task for it.The present invention constructs a tune by cluster manager dual system The cluster management scheme of degree process detects the availability of each scheduling process by cluster manager dual system timing, difference can be appointed Business, which is shared in multiple and different, available scheduling process, to be executed, and the execution efficiency of scheduler task is substantially increased.
Based on a kind of management method of scheduling process provided by the invention above, the present invention also provides a kind of scheduling processes Managing device is applied particularly to cluster manager dual system, as shown in Figure 1, the cluster manager dual system is connect with multiple scheduling processes, n is Positive integer, and the identity for the scheduling process each connecting with the cluster manager dual system is stored in the cluster manager dual system. The identity of process is wherein dispatched for example including the instance number etc. of scheduling process.
Specifically as shown in figure 3, the managing device of scheduling process provided by the invention may include:
First judging unit 10, for the heart according to the first scheduling process the last time saved in the cluster manager dual system Registion time is jumped, is judged in preset first time interval, if receives the heartbeat that the first scheduling process is sent and disappears Breath;Wherein the heartbeat message includes the identity of the first scheduling process, the first time interval and described first Scheduling process is corresponding, and the first scheduling process is any one in the scheduling process connecting with the cluster manager dual system.
In the present invention, the scheduling process each connecting with cluster manager dual system completes note in cluster manager dual system Volume, identity are stored in cluster manager dual system.Preferably, the present invention can setting can use tune in cluster manager dual system in advance Process list is spent, the identity of each scheduling process is stored in the available scheduling process list.In this way, cluster manager dual system Each scheduling state of a process can be successively inquired, facilitates cluster manager dual system to each according to the available scheduling process list The management of scheduling process.
For each scheduling process for completing registration, cluster manager dual system can all set corresponding scheduling process after the completion of registration Time interval, after completing registration in cluster manager dual system such as the first scheduling process, cluster manager dual system is set for the first scheduling process Set corresponding first time interval;Similarly, the second scheduling process is completed in cluster manager dual system after registering, cluster manager dual system the Corresponding second time interval is arranged in two scheduling processes.In the present invention, each scheduling process is correspondingly arranged on time interval, and The time interval that each scheduling process is correspondingly arranged may be the same or different.In the present invention optionally, time interval is for example It can be 15 seconds, 30 seconds, 50 seconds etc., the present invention no longer limits this.
In the present invention, by taking the first corresponding first time interval of scheduling process is 30 seconds as an example, the first scheduling process to After cluster manager dual system sends a heartbeat message, a heartbeat message can be sent to cluster manager dual system again after 30 seconds.
For cluster manager dual system, cluster manager dual system will record and save what the scheduling process received was sent each time The time (for ease of description, which is referred to as heartbeat registion time by the present invention) of heartbeat message, and the heartbeat is registered Time replaces the last (i.e. newest) heartbeat registion time that cluster manager dual system has saved before, that is to say, that collection When what group's manager saved is all the heartbeat registration of the heartbeat message sent recently received scheduling process the last time forever Between.
Wherein, for completing the scheduling process of registration in cluster manager dual system for the first time, cluster manager dual system is directly saved Receive the heartbeat registion time of the heartbeat message of scheduling process transmission.
For ease of description, the present invention is by taking the first scheduling process as an example, specifically, the first judging unit 10 in the present invention It can be specifically used for, obtain current time, and the current time is subtracted to described first saved in the cluster manager dual system The heartbeat registion time of scheduling process the last time, obtains heartbeat time interval;Judge to be not more than in the heartbeat time interval In the time of the preset first time interval, if receive the heartbeat message that the first scheduling process is sent;Or, the One judging unit 10 is specifically used for, and the heartbeat according to the first scheduling process the last time saved in the cluster manager dual system is registered Time and the first time interval calculate the deadline that the first scheduling process sends heartbeat message;Judge described When deadline reaches or before reaching, if receive the heartbeat message that the first scheduling process is sent.
First processing units 20, for judging to connect in preset first time interval in first judging unit 10 When receiving the heartbeat message that the first scheduling process is sent, determine that the first scheduling process is available, and save and receive institute State the heartbeat registion time of the heartbeat message of the first scheduling process transmission.
The second processing unit 30, for judging do not have in preset first time interval in first judging unit 10 When having the heartbeat message for receiving the first scheduling process transmission, determine that the first scheduling process is unavailable.
Preferably, as shown in figure 4, the managing device of scheduling process provided by the invention can also include:
Second judgment unit 40 is used for when described the second processing unit 30 determines that the first scheduling process is unavailable, Judge the first scheduling process currently whether in execution task;
Task reassigns unit 50, for judging that the first scheduling process is currently being held in the second judgment unit 40 When row task, the task that the first scheduling process executes is withdrawn, and the task is redistributed to current have determined that can , idle second scheduling process so that the second scheduling process re-executes the task;Wherein described second adjust Degree process is any one in the scheduling process connecting with the cluster manager dual system.
And the managing device of scheduling process provided by the invention can also include:
Third judging unit, for receive third scheduling process send heartbeat message, and according to the third dispatch into The identity in heartbeat message that journey is sent judges the third scheduling process whether is stored in the cluster manager dual system Identity;
Third processing unit, for judging not stored in the cluster manager dual system there is described in the third judging unit When the identity of three scheduling processes, the identity of the third scheduling process is stored, to complete the third scheduling process Registration in the cluster manager dual system, and save the heartbeat note for receiving the heartbeat message that the third scheduling process is sent The volume time, and third time interval corresponding with third scheduling process is set.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment weight Point explanation is the difference from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For device class embodiment, since it is basically similar to the method embodiment, so being described relatively simple, related place ginseng See the part explanation of embodiment of the method.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
The management method and device of a kind of scheduling process provided by the present invention are described in detail above, herein Apply that a specific example illustrates the principle and implementation of the invention, the explanation of above example is only intended to help Understand method and its core concept of the invention;At the same time, for those skilled in the art, according to the thought of the present invention, There will be changes in the specific implementation manner and application range, in conclusion the content of the present specification should not be construed as to this The limitation of invention.

Claims (10)

1. a kind of management method of scheduling process, which is characterized in that be applied to cluster manager dual system, the cluster manager dual system with it is multiple The connection of scheduling process, and the identity for the scheduling process each connecting with the cluster manager dual system is stored in the cluster management In device;Method includes:
According to the heartbeat registion time of the first scheduling process the last time saved in the cluster manager dual system, judge preset In first time interval, if receive the heartbeat message that the first scheduling process is sent;Wherein the heartbeat message includes The identity of the first scheduling process, the first time interval is corresponding with the first scheduling process, and described first adjusts Degree process is any one in the scheduling process connecting with the cluster manager dual system;
When the heartbeat message for judging to receive the first scheduling process transmission in preset first time interval, it is determined that The first scheduling process is available, and when saving the heartbeat registration for receiving the heartbeat message that the first scheduling process is sent Between;
When the heartbeat message for judging to be not received by the first scheduling process transmission in preset first time interval, then Determine that the first scheduling process is unavailable.
2. the method according to claim 1, wherein the method also includes:
When determining that the first scheduling process is unavailable, judge the first scheduling process currently whether in the task of execution;
If the task that the first scheduling process executes withdrawn, and the task is redistributed in the task of execution The second available, idle scheduling process is currently had determined that, so that the second scheduling process re-executes the task;Its Described in the second scheduling process be any one in the scheduling process being connect with the cluster manager dual system.
3. the method according to claim 1, wherein according to first saved in the cluster manager dual system dispatch into The heartbeat registion time of journey the last time, judges in preset first time interval, if receive described first dispatch into Journey send heartbeat message include:
Current time is obtained, and the current time is subtracted to the first scheduling process saved in the cluster manager dual system most Nearly primary heartbeat registion time, obtains heartbeat time interval;
Judge within time of the heartbeat time interval no more than the preset first time interval, if receive described The heartbeat message that first scheduling process is sent;
Or, the heartbeat registion time according to the first scheduling process the last time saved in the cluster manager dual system, judges pre- If first time interval in, if receiving the heartbeat message that the first scheduling process is sent includes:
According to the first scheduling process the last time saved in the cluster manager dual system heartbeat registion time and it is described first when Between be spaced, calculate it is described first scheduling process send heartbeat message deadline;
Judge when reaching the deadline or before reaching, if receive the heartbeat that the first scheduling process is sent and disappear Breath.
4. the method according to claim 1, wherein cluster manager dual system use can use scheduling process list Mode stores the identity of each scheduling process.
5. method according to claim 1-4, which is characterized in that the method also includes:
When the heartbeat message for receiving third scheduling process transmission, and in the heartbeat message sent according to third scheduling process Identity, when judging the not stored identity for having third scheduling process in the cluster manager dual system, described in storage Third dispatches the identity of process, to complete registration of the third scheduling process in the cluster manager dual system, Yi Jibao The heartbeat registion time for receiving the heartbeat message that the third scheduling process is sent is deposited, and is arranged and dispatches process with the third Corresponding third time interval.
6. a kind of managing device of scheduling process, which is characterized in that be applied to cluster manager dual system, the cluster manager dual system with it is multiple The connection of scheduling process, and the identity for the scheduling process each connecting with the cluster manager dual system is stored in the cluster management In device;Device includes:
First judging unit, for the heartbeat registration according to the first scheduling process the last time saved in the cluster manager dual system Time judges in preset first time interval, if receives the heartbeat message that the first scheduling process is sent;Wherein The heartbeat message includes the identity of the first scheduling process, the first time interval and the first scheduling process Corresponding, the first scheduling process is any one in the scheduling process connecting with the cluster manager dual system;
First processing units receive described for judging in preset first time interval in first judging unit It when the heartbeat message that the first scheduling process is sent, determines that the first scheduling process is available, and saves and receive first tune The heartbeat registion time for the heartbeat message that degree process is sent;
The second processing unit, for judging to be not received by preset first time interval in first judging unit When the heartbeat message that the first scheduling process is sent, determine that the first scheduling process is unavailable.
7. device according to claim 6, which is characterized in that described device further include:
Second judgment unit, for when described the second processing unit determines that the first scheduling process is unavailable, described in judgement Whether the first scheduling process is currently in the task of execution;
Task reassigns unit, for judging the first scheduling process currently in the task of execution in the second judgment unit When, the task that the first scheduling process executes is withdrawn, and the task is redistributed to currently have determined that it is available, empty The second not busy scheduling process, so that the second scheduling process re-executes the task;Wherein the second scheduling process For any one in the scheduling process that is connect with the cluster manager dual system.
8. device according to claim 6, which is characterized in that
First judging unit is specifically used for, and obtains current time, and the current time is subtracted the cluster manager dual system The heartbeat registion time of described first scheduling process the last time of middle preservation, obtains heartbeat time interval;Judge in the heart Time interval is jumped no more than in the time of the preset first time interval, if receive the first scheduling process and send Heartbeat message;
Or, first judging unit is specifically used for, according to the first scheduling process nearest one saved in the cluster manager dual system Secondary heartbeat registion time and the first time interval, when calculating the cut-off of the first scheduling process transmission heartbeat message Between;Judge when reaching the deadline or before reaching, if receive the heartbeat that the first scheduling process is sent and disappear Breath.
9. device according to claim 6, which is characterized in that the cluster manager dual system use can use scheduling process list Mode stores the identity of each scheduling process.
10. according to the described in any item devices of claim 6-9, which is characterized in that described device further include:
Third judging unit, the heartbeat message sent for receiving third scheduling process, and according to third scheduling process hair The identity in heartbeat message sent judges the identity that the third scheduling process whether is stored in the cluster manager dual system Mark;
Third processing unit, for judging not stored in the cluster manager dual system there is the third tune in the third judging unit When the identity of degree process, the identity of the third scheduling process is stored, to complete the third scheduling process in institute When stating the registration in cluster manager dual system, and saving the heartbeat registration for receiving the heartbeat message that the third scheduling process is sent Between, and third time interval corresponding with third scheduling process is set.
CN201811600954.0A 2018-12-26 2018-12-26 A kind of management method and device of scheduling process Pending CN109725999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811600954.0A CN109725999A (en) 2018-12-26 2018-12-26 A kind of management method and device of scheduling process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811600954.0A CN109725999A (en) 2018-12-26 2018-12-26 A kind of management method and device of scheduling process

Publications (1)

Publication Number Publication Date
CN109725999A true CN109725999A (en) 2019-05-07

Family

ID=66297193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811600954.0A Pending CN109725999A (en) 2018-12-26 2018-12-26 A kind of management method and device of scheduling process

Country Status (1)

Country Link
CN (1) CN109725999A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427706A (en) * 2020-03-20 2020-07-17 中国联合网络通信集团有限公司 Data processing method, multi-server system, database, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
CN102801961A (en) * 2012-08-21 2012-11-28 北京捷成世纪科技股份有限公司 Multiprocess-based audio/video data processing method and system
CN105704107A (en) * 2014-11-28 2016-06-22 中兴通讯股份有限公司 Method for realizing heartbeat communication, registration center, service end and client
CN106547670A (en) * 2016-10-10 2017-03-29 许昌许继软件技术有限公司 The method and device of long-range reading and writing built-in Linux application program memory variable value
CN106933659A (en) * 2015-12-30 2017-07-07 华为技术有限公司 The method and apparatus of managing process
US20180054372A1 (en) * 2012-07-13 2018-02-22 Netflix, Inc. System and method for detecting active streams using a heartbeat and secure stop mechanism

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996257A (en) * 2006-12-26 2007-07-11 华为技术有限公司 Method and system for monitoring process
US20180054372A1 (en) * 2012-07-13 2018-02-22 Netflix, Inc. System and method for detecting active streams using a heartbeat and secure stop mechanism
CN102801961A (en) * 2012-08-21 2012-11-28 北京捷成世纪科技股份有限公司 Multiprocess-based audio/video data processing method and system
CN105704107A (en) * 2014-11-28 2016-06-22 中兴通讯股份有限公司 Method for realizing heartbeat communication, registration center, service end and client
CN106933659A (en) * 2015-12-30 2017-07-07 华为技术有限公司 The method and apparatus of managing process
CN106547670A (en) * 2016-10-10 2017-03-29 许昌许继软件技术有限公司 The method and device of long-range reading and writing built-in Linux application program memory variable value

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郑人杰: "《高级程序员水平考试指导》", 31 March 1991, 清华大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427706A (en) * 2020-03-20 2020-07-17 中国联合网络通信集团有限公司 Data processing method, multi-server system, database, electronic device, and storage medium
CN111427706B (en) * 2020-03-20 2023-06-20 中国联合网络通信集团有限公司 Data processing method, multi-server system, database, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN108446871B (en) Order distribution processing method and device
US6317060B1 (en) Base station system and method for monitoring travel of mobile vehicles and communicating notification messages
US20190096010A1 (en) Real-time wait estimation and prediction via embedded sensors
US20230401495A1 (en) Service management method and system
US20140214465A1 (en) Processing restaurant orders within computing systems
CN107959705A (en) The distribution method and control server of streaming computing task
CN106817408B (en) Distributed server cluster scheduling method and device
CN106790519A (en) Service scheduling method and fringe node
US20120197670A1 (en) Online restaurant systems for forecasting behaviors of late customers
CN110308983A (en) Method for balancing resource load and system, service node and client
WO2005089240A3 (en) System and method for providing multi-resource management support in a compute environment
US20120303402A1 (en) Real-Time Alert System and Method
CN107093039A (en) Method for information display, hand marker method, abnormal order processing method and device
CN108322358B (en) Method and device for sending, processing and consuming multi-live distributed messages in different places
CN104202386B (en) A kind of high concurrent amount distributed file system and its secondary load equalization methods
CN106097092A (en) Data processing method and device for reconciliation
CN107229397A (en) A kind of method, system, terminal and storage device for improving terminal fluency
CN103207806A (en) Method and system for sending messages
CN106790092A (en) Remote procedure call services end control system and method
CN109871273A (en) A kind of adaptive task moving method and device
CN109886839A (en) A kind of intelligence food delivery system and method
CN109725999A (en) A kind of management method and device of scheduling process
CN106991070A (en) Real-time computing technique and device
CN103813033B (en) A kind of call route method and system
CN110505086A (en) A kind of method and device that distributed director is fault-tolerant

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190507

RJ01 Rejection of invention patent application after publication