Embodiment
In order to make the object of the invention, technical scheme and advantage clearly, further illustrate technical scheme of the present invention below in conjunction with accompanying drawing by specific embodiment.
Embodiment one
Fig. 1 is the distributed task dispatching method flow diagram described in the present embodiment, and the present embodiment mainly carries out the method for task scheduling and execution in a distributed manner between task scheduling apparatus (being generally the director server in distributed task dispatching system) and task execution device in task scheduling system (such as Oracle puts functional module in storage, Linux data upload functional module, Hadoop check account module etc.).As shown in Figure 1, the distributed task dispatching method described in the present embodiment comprises:
The task scheduling request that S101, reception task execution device send.
Task scheduling apparatus receives the task scheduling request that task execution device sends, and wherein said task scheduling request comprises the identification information of task type (such as Oracle puts task, Linux data upload task, Hadoop MapReduce task dispatching in storage) and described task execution device.The identification information of wherein said task execution device is used for each task execution device difference to come.In the present embodiment, the identification information of described task execution device can be No. ID or title of task execution device.
S102, according to task scheduling request, subtask to be verified, obtain the subtask set by verification.
Wherein, the number of verification viewing system scale and subtask carried out to how many subtasks and determine.If number school, subtask is few or system scale school is little, can realize verifying all subtasks, from all subtasks, obtain the subtask set by verification; If subtask number is more or system scale school large, can realize verifying parton task, such as, stop comparatively testing other subtasks when obtaining and reaching preset value by the subtask number of verification.
The subtask that the task scheduling request that selection and task execution device send from subtask is suitable, obtains the subtask set by verification.
Wherein, subtask is by carrying out Task-decomposing acquisition to task, and Fig. 2 is the task analytic approach process flow diagram of the present embodiment, and as shown in Figure 2, the task analytic approach described in the present embodiment comprises:
S201, reception also store tasks.
Task comprises different task types, and the attribute of various types of task comprises: task identifier (such as task names or task ID number), and task type, also can comprise entry-into-force time, duty cycle, task execution device person liable etc.And the task of different task type, its attribute is different, if the task of certain type relates to carry out data transmission (such as by the Data Migration in HDFS in MYSQL) between two machines, then the task of the type also comprises the information such as source server identifier (as IP address), destination server identifier (as IP address).
The mode receiving also store tasks can have multiple, such as, by providing special subtask to submit to software or subtask to submit to webpage to realize.In a preferred implementation of the present embodiment, webpage is submitted to supply user to submit subtask to by providing special subtask.Due to different task types, the mission bit stream needing user to provide is different, on webpage, can list all registered task types by the form of drop-down list, when user selects the type wanting submitting to of task, the page dynamically provides the list of the type task.
Such as, user creates the data loading task that a type is " HDFS warehouse-in is to MYSQL ", the task names that user fills in is " APP timesharing overview model warehouse-in MySQL ", this task is used for the suffix under the B file path of A server being called E, F, G, the H in the D table under the file of * .C ... Deng the data of row, respectively according to f1, f2, f3, f4 ... e, f, g, the h in the d table of a service is moved to etc. mapping relations ... Deng row.Duty cycle is once per minute, and the entry-into-force time is " 2013-04-0116:00:00 ", when the time that task can be activated every day is the earliest 00 00 point, performs 100000 data at every turn.
And for example, user creates the task that a type is " Hadoop MapReduce calculates ", the task names that user fills in is " APP timesharing overview daily calculates ", for the suffix under HDFS cluster A upper pathway B being called the data file D of .C, calculate according to the Map class F performed inside Jar bag E and Reduce class G, and under result being outputted to the path H on cluster A.Duty cycle is once a day, and the entry-into-force time is " 2013-04-0100:00:00 ".
S202, according to preset task decomposition rule, Task-decomposing is become subtask.
According to task attribute, according to the Task-decomposing rule of the type task preset, Task-decomposing is become subtask.Such as, according to the entry-into-force time of task as initial time Task-decomposing being become subtask, subtask can be generated successively according to duty cycle, by the subtask write subtask list of generation.
If first time carries out Task-decomposing to certain task, then the initial time of first subtask generated is set as the entry-into-force time of task, and closing time of first subtask is the time adding entry-into-force time of task a duty cycle.
If not first time, Task-decomposing is carried out to certain task, the initial time of the subtask then generated is set as that the generation ordinal number of this subtask subtracts the time of being multiplied by a duty cycle after one, the subtask of generation be set as that the generation ordinal number of this subtask is multiplied by the time of a duty cycle closing time.
When the system time of distributed task dispatching system reaches the closing time of certain subtask, then by this subtask write subtask list.In the subtask of certain task, there is the system time being later than distributed task dispatching system closing time of a subtask or be later than the task out-of-service time, then suspending and Task-decomposing is carried out to this task.
The subtask that S203, storage generate.
Subtask comprises with properties: the identifier (such as task ID number), subtask type etc. of task belonging to subtask identifier (such as No. ID, subtask), subtask, and belonging to wherein said subtask type and this subtask, the task type of task is identical.
Behind each generation subtask, subtask is stored, for task scheduling apparatus scheduling, such as, in the form of a list subtask is stored as subtask list.
S103, from subtask set chooser task be issued to task execution device.
The subtask selecting the task scheduling request that sends with task execution device suitable from the subtask set that previous step obtains is issued to this task execution device.
Such as, if receive the task scheduling request that a task execution device sends, the identification information of its actuating unit is IP address (such as 172.23.1.100), the task type of request is that Hadoop MapReduce calculates, request time is 2013-04-0116:01:15, subtask then in antithetical phrase set of tasks verifies according to the check logic that issues preset, filter out the subtask suitable with described task scheduling request, such as to select task identifier be the initial time of A is the subtask of 2013-04-0100:00:00, is handed down to this task execution device.
The execution result that S104, reception task execution device return, the attribute of amendment subtask.
The success of group tasks carrying, can remove subtask list and store separately by this subtask, or the attribute of amendment subtask, identifies the state of this subtask.If the latter, then the attribute of subtask also can comprise: the information such as subtask state and number of retries.When receiving the execution result that task execution device returns, according to the status information returning results amendment subtask.When running succeeded, sending the information that runs succeeded of subtask, when task scheduling apparatus receives the information that subtask runs succeeded, parsing subtask identifier, changing the state of this subtask in the list of subtask into success status (SUCCESSFUL).When performing unsuccessfully, sending subtask and performing failed information, when task scheduling apparatus receives the failed information of subtask execution, parse subtask and identifier, the number of retries of this subtask in the list of subtask is added 1.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value, then no longer issuing this subtask.
In the technical scheme of the distributed task dispatching method described in the present embodiment, task scheduling apparatus is after the task scheduling request receiving task execution device transmission, according to issuing check logic, subtask is verified, subtask by verification is issued to task execution device, achieve the stateless communication between task scheduling apparatus and task execution device, conveniently can carry out linear expansion to task execution device, the executive capability of task can be promoted; By managing concentratedly the different task being applicable to different task actuating unit and dispatching, the global association between different task can be realized, the dependence be applicable between the different task of different task actuating unit can be supported.
Embodiment two
Fig. 3 is the distributed task dispatching method flow diagram described in the present embodiment, and the present embodiment mainly carries out the method for task scheduling and execution in a distributed manner between task scheduling apparatus (being generally the director server in distributed task dispatching system) and task execution device in task scheduling system (such as Oracle puts functional module in storage, Linux data upload functional module, Hadoop check account module etc.).As shown in Figure 3, the distributed task dispatching method described in the present embodiment comprises:
The task scheduling request that S301, reception task execution device send.
Task scheduling apparatus receives the task scheduling request that task execution device sends, and wherein said task scheduling request comprises the identification information of task type (such as Oracle puts task, Linux data upload task, Hadoop MapReduce task dispatching in storage) and described task execution device.The identification information of wherein said task execution device is used for each task execution device difference to come.In the present embodiment, the identification information of described task execution device can be No. ID or title of task execution device.
S302, according to issuing check logic, subtask to be verified according to task scheduling request, obtaining the subtask set by verification.
Wherein, the number of verification viewing system scale and subtask carried out to how many subtasks and determine.If number school, subtask is few or system scale school is little, can realize verifying all subtasks, from all subtasks, obtain the subtask set by verification; If subtask number is more or system scale school large, can realize verifying parton task, such as, stop comparatively testing other subtasks when obtaining and reaching preset value by the subtask number of verification.
The subtask that the task scheduling request that selection and task execution device send from subtask is suitable, obtains the subtask set by verification.
Wherein, subtask is by carrying out Task-decomposing acquisition to task, and its concrete mode is as shown in embodiment one, and therefore not to repeat here.
In a preferred implementation of the present embodiment, described in issue check logic and comprise: according to preset order, task verification, subtask verification, actuating unit verification and/or dependence verification are carried out to subtask.
Task verification comprises, and the attribute of task belonging to subtask, judges whether subtask meets task scheduling request.Particularly, task verification can comprise:
(1) whether the task type of task belonging to syndrome task is with consistent with the task type of task execution device request.
(2) belonging to syndrome task, whether task is restricted to task execution device, such as, whether limit the identification information (such as IP address) of task execution device whether within the scope of restriction.The attribute of such as subtask also comprises task execution device information, comprising: allow all task execution devices, only allow some or more than one identification information to be the task execution device of particular value.
(3) whether be effective, namely whether verification can be in effective status by task belonging to the subtask that issues if verifying the state of task.Whether the attribute information of such as task also comprises effective, when subtask is verified,
Obtain the affiliated task of this subtask, judge whether effectively whether the attribute of described affiliated task be effective, if not effectively then show that this subtask is not by verification.
(4) whether the priority of task belonging to syndrome task belongs within the priority limit of the task execution device registration sending task requests.The attribute information of such as task also comprises priority, the log-on message of task execution device in task scheduling apparatus comprises identification information and the priority limit of task execution device, the priority limit of this task execution device is obtained by the identification information of the task execution device in task scheduling request, when subtask is verified, obtain the affiliated task of this subtask, judge described belonging to the priority of task whether within the priority limit of described task execution device.
Such as, the task execution device X laid respectively on machine A, B, C type of all executing the task is the task of Y, only be absorbed in make the task execution device on machine A and do the high task of priority, the priority limit that then can limit the task execution device X on machine A is 8-10, then when the task execution device X on machine A asks subtask, the task of priority limit to be the task type of 1-7 be Y can not issue.
(5) dependence that whether task belonging to syndrome task meets between this task and other tasks limits.
Subtask verification comprises, and judges whether each subtask meets issue condition according to the information of subtask.Particularly, subtask verification can comprise:
(1) whether syndrome task is the subtask can forcing to issue.
Such as, a kind of subtask type can be set, for the different subtasks belonging to same task, the subtask of this subtask type be had and the highest issues priority.
(2) whether the state of syndrome task is can by the state issued.Such as, the subtask of ready state (READY) can be issued, and the subtask that task status is success status (SUCCESSFUL) can not be issued.
(3) whether syndrome task is later than the request time of task scheduling apparatus closing time.If just can be issued.
(4) whether syndrome task meets time delay.
Such as, require that the closing time that current time is later than subtask adds time delay, just can be issued.
(5) whether syndrome task meets start-up time.
Such as, require that current time is later than the start-up time on the same day of subtask, just can be issued.
(6) whether syndrome task meets the dependence between this subtask and other subtasks.
(7) whether syndrome task meets the number of attempt restriction preset.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value,
(8) whether the subtask verifying retry reaches the retry stand-by period.The attribute of such as subtask also comprises the retry stand-by period, and the described retry stand-by period is for limiting the minimum time also needing when subtask issues unsuccessfully to wait for.
Actuating unit verification comprises, and according to the log-on message of the task execution device of transmission task requests, obtains the trustship machine information of described task execution device, judges whether described trustship machine information meets the qualifications of subtask to trustship machine.Particularly, actuating unit verification comprises:
(1) the restriction whether identification information sending the task execution device of task requests meets subtask is verified.The attribute of such as subtask also comprises the identification information of task execution device, for limiting the task execution device performing this subtask.
(2) verification sends whether the current state of the task execution device of task requests is effective.
(3) verification sends the restriction whether subtask that the task execution device of task requests runs simultaneously meets subtask.
(4) priority of syndrome task whether meet send task requests task execution device to the qualifications of the priority of subtask.
(5) verify the number sending the subtask that the task execution device of task requests is performing whether to meet by the restriction of the subtask verified.
In a preferred implementation of the present embodiment, the preposition subtask of dependence verification for obtaining subtask, according to the dependence between described subtask and described preposition subtask, judges whether described subtask meets the condition of issuing.
It should be noted that, concrete issues in check logic, the order of various verification the order of the unalterable of non-critical, within all spirit in present embodiment and principle, the increasing of any step, delete and/or exchange, be all included within the method described in the present embodiment.
S303, from subtask set chooser task be issued to task execution device.
Through above-mentioned issue check logic verification after, sorted according to preset algorithm in the subtask met, first subtask be issued to the task execution device of described transmission task requests.
Particularly, sequence comprises: to each subtask in the set of described subtask according to number of attempt Bit-reversed, carry out order according to priority and sort, sort according to period type number sequence or sort according to order working time.
The execution result that S304, reception task execution device return, the attribute of amendment subtask.
The success of group tasks carrying, can remove subtask list and store separately by this subtask, or the attribute of amendment subtask, identifies the state of this subtask.If the latter, then the attribute of subtask also can comprise: the information such as subtask state and number of retries.When receiving the execution result that task execution device returns, according to the status information returning results amendment subtask.When running succeeded, sending the information that runs succeeded of subtask, when task scheduling apparatus receives the information that subtask runs succeeded, parsing subtask identifier, changing the state of this subtask in the list of subtask into success status (SUCCESSFUL).When performing unsuccessfully, sending subtask and performing failed information, when task scheduling apparatus receives the failed information of subtask execution, parse subtask and identifier, the number of retries of this subtask in the list of subtask is added 1.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value, then no longer issuing this subtask.
In the technical scheme of the distributed task dispatching method described in the present embodiment, collect by issuing verification sieve subtask is verified, obtain the subtask set by verification, meticulousr centralized management and scheduling can be carried out to the different task being applicable to different task actuating unit, the global association between different task can be realized, the dependence be applicable between the different task of different task actuating unit can be supported.
Embodiment three
The present embodiment proposes a kind of distributed task dispatching device, Fig. 4 is the distributed task dispatching device schematic diagram described in the present embodiment, as described in Figure 4, distributed task dispatching device described in the present embodiment can cover all data analysis systems, comprises Postgre, TDW, Linux, Hadoop, Oracle, Mysql etc.
Fig. 5 is the distributed task dispatching apparatus structure block diagram described in the present embodiment, as shown in Figure 5, the distributed task dispatching device 501 described in the present embodiment is for receiving and respond the task scheduling request of task execution device 1, task execution device 2, task execution device N etc.
Described distributed task dispatching device 501 comprises: dispatch request receiving element 5011, issue verification unit 5012, issue unit 5013 and result feedback unit 5014.
Dispatch request receiving element 5011, for receiving the task scheduling request that task execution device sends, wherein said task scheduling request comprises the identification information of task type and described task execution device.
Wherein said task scheduling request comprises the identification information of task type (such as Oracle puts task, Linux data upload task, Hadoop MapReduce task dispatching in storage) and described task execution device.The identification information of wherein said task execution device is used for each task execution device difference to come.In the present embodiment, the identification information of described task execution device can be No. ID or title of task execution device.
Issue verification unit 5012, for according to described task scheduling request, according to issuing check logic, at least one subtask is verified, obtain the subtask set by verification, the attribute of wherein said subtask comprises: subtask identifier, the identifier of subtask type and affiliated task, and the attribute of task comprises: task identifier, task type, the subtask type of subtask is identical with the task type of the task belonging to described subtask.
Wherein, the number of verification viewing system scale and subtask carried out to how many subtasks and determine.If number school, subtask is few or system scale school is little, can realize verifying all subtasks, from all subtasks, obtain the subtask set by verification; If subtask number is more or system scale school large, can realize verifying parton task, such as, stop comparatively testing other subtasks when obtaining and reaching preset value by the subtask number of verification.
The subtask that the task scheduling request that selection and task execution device send from subtask is suitable, obtains the subtask set by verification.
Wherein, subtask is by carrying out Task-decomposing acquisition to task, and its concrete mode is as described in embodiment one, and therefore not to repeat here.
Issue unit 5013, be issued to for chooser task from the set of subtask the task execution device sending task scheduling request.
Issue after verification unit 5012 carries out issuing check logic verification through above-mentioned, sorted according to preset algorithm in the subtask met, first subtask is issued to the task execution device of described transmission task requests.
Particularly, sequence comprises: to each subtask in the set of described subtask according to number of attempt Bit-reversed, carry out order according to priority and sort, sort according to period type number sequence or sort according to order working time.
Result feedback unit 5014, for receiving the execution result that described task execution device returns, according to the attribute of the subtask issued described in execution result amendment.
The success of group tasks carrying, can remove subtask list and store separately by this subtask, or the attribute of amendment subtask, identifies the state of this subtask.If the latter, then the attribute of subtask also can comprise: the information such as subtask state and number of retries.When receiving the execution result that task execution device returns, according to the status information returning results amendment subtask.When running succeeded, sending the information that runs succeeded of subtask, when task scheduling apparatus receives the information that subtask runs succeeded, parsing subtask identifier, changing the state of this subtask in the list of subtask into success status (SUCCESSFUL).When performing unsuccessfully, sending subtask and performing failed information, when task scheduling apparatus receives the failed information of subtask execution, parse subtask and identifier, the number of retries of this subtask in the list of subtask is added 1.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value, then no longer issuing this subtask.
The technical scheme of the distributed task dispatching device described in the present embodiment adopts distributed architectural framework to communicate with stateless, achieve the stateless communication between task scheduling apparatus and task execution device, conveniently can carry out linear expansion to task execution device, the executive capability of task can be promoted; By managing concentratedly the different task being applicable to different task actuating unit and dispatching, the global association between different task can be realized, the dependence be applicable between the different task of different task actuating unit can be supported.
Embodiment four
Fig. 7 is the distributed task dispatching apparatus structure block diagram described in the present embodiment, as shown in Figure 7, the distributed task dispatching device 701 described in the present embodiment is for receiving and responding the task scheduling requests such as task execution device 1, task execution device 2, task execution device N.
Described distributed task dispatching device 701 comprises: dispatch request receiving element 7011, issue verification unit 7012, issue unit 7013 and result feedback unit 7014.
Dispatch request receiving element 7011, for receiving the task scheduling request that task execution device sends, wherein said task scheduling request comprises the identification information of task type and described task execution device.
Wherein said task scheduling request comprises the identification information of task type (such as Oracle puts task, Linux data upload task, Hadoop MapReduce task dispatching in storage) and described task execution device.The identification information of wherein said task execution device is used for each task execution device difference to come.In the present embodiment, the identification information of described task execution device can be No. ID or title of task execution device.
Issuing verification unit 7012, for according to described task scheduling request, according to issuing check logic, at least one subtask being verified, obtain the subtask set by verification.
Wherein, the number of verification viewing system scale and subtask carried out to how many subtasks and determine.If number school, subtask is few or system scale school is little, can realize verifying all subtasks, from all subtasks, obtain the subtask set by verification; If subtask number is more or system scale school large, can realize verifying parton task, such as, stop comparatively testing other subtasks when obtaining and reaching preset value by the subtask number of verification.
The subtask that the task scheduling request that selection and task execution device send from subtask is suitable, obtains the subtask set by verification.
Wherein, subtask is by carrying out Task-decomposing acquisition to task, and its concrete mode is as shown in embodiment one, and therefore not to repeat here.
In a preferred implementation of the present embodiment, described verification unit 7012 comprises task syndrome unit 70121, subtask syndrome unit 70122, actuating unit syndrome unit 70123 and dependence syndrome unit 70124:
According to preset order by described task syndrome unit 70121, subtask syndrome unit 70122, actuating unit syndrome unit 70123 and dependence syndrome unit 70124, task verification, subtask verification, actuating unit verification and/or dependence verification are carried out to subtask.
Task syndrome unit 70121 for: the attribute of task belonging to subtask, judges whether subtask meets task scheduling request.Particularly, task syndrome unit 70121 can be used for:
(1) whether the task type of task belonging to syndrome task is with consistent with the task type of task execution device request.
(2) belonging to syndrome task, whether task is restricted to task execution device, such as, whether limit the identification information (such as IP address) of task execution device whether within the scope of restriction.The attribute of such as subtask also comprises task execution device information, comprising: allow all task execution devices, only allow some or more than one identification information to be the task execution device of particular value.
(3) whether be effective, namely whether verification can be in effective status by task belonging to the subtask that issues if verifying the state of task.Whether the attribute information of such as task also comprises effective, when verifying subtask, obtains the affiliated task of this subtask, judges whether effectively whether the attribute of described affiliated task be effective, if not effectively then show that this subtask is not by verification.
(4) whether the priority of task belonging to syndrome task belongs within the priority limit of the task execution device registration sending task requests.The attribute information of such as task also comprises priority, the log-on message of task execution device in task scheduling apparatus comprises identification information and the priority limit of task execution device, the priority limit of this task execution device is obtained by the identification information of the task execution device in task scheduling request, when subtask is verified, obtain the affiliated task of this subtask, judge described belonging to the priority of task whether within the priority limit of described task execution device.
Such as, the task execution device X laid respectively on machine A, B, C type of all executing the task is the task of Y, only be absorbed in make the task execution device on machine A and do the high task of priority, the priority limit that then can limit the task execution device X on machine A is 8-10, then when the task execution device X on machine A asks subtask, the task of priority limit to be the task type of 1-7 be Y can not issue.
(5) dependence that whether task belonging to syndrome task meets between this task and other tasks limits.
Subtask syndrome unit 70122 for: judge that whether each subtask meets according to the information of subtask and issue condition.Particularly, subtask syndrome unit 70122 for:
(1) whether syndrome task is the subtask can forcing to issue.
Such as, a kind of subtask type can be set, for the different subtasks belonging to same task, the subtask of this subtask type be had and the highest issues priority.
(2) whether the state of syndrome task is can by the state issued.Such as, the subtask of ready state (READY) can be issued, and the subtask that task status is success status (SUCCESSFUL) can not be issued.
(3) whether syndrome task is later than the request time of task scheduling apparatus closing time.If just can be issued.
(4) whether syndrome task meets time delay.
Such as, require that the closing time that current time is later than subtask adds time delay, just can be issued.
(5) whether syndrome task meets start-up time.
Such as, require that current time is later than the start-up time on the same day of subtask, just can be issued.
(6) whether syndrome task meets the dependence between this subtask and other subtasks.
(7) whether syndrome task meets the number of attempt restriction preset.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value,
(8) whether the subtask verifying retry reaches the retry stand-by period.The attribute of such as subtask also comprises the retry stand-by period, and the described retry stand-by period is for limiting the minimum time also needing when subtask issues unsuccessfully to wait for.
Actuating unit syndrome unit 70123 for: according to the log-on message of task execution device sending task requests, obtain the trustship machine information of described task execution device, judge whether described trustship machine information meets the qualifications of subtask to trustship machine.Particularly, actuating unit syndrome unit 70123 can be used for:
(1) the restriction whether identification information sending the task execution device of task requests meets subtask is verified.The attribute of such as subtask also comprises the identification information of task execution device, for limiting the task execution device performing this subtask.
(2) verification sends whether the current state of the task execution device of task requests is effective.
(3) verification sends the restriction whether subtask that the task execution device of task requests runs simultaneously meets subtask.
(4) priority of syndrome task whether meet send task requests task execution device to the qualifications of the priority of subtask.
(5) verify the number sending the subtask that the task execution device of task requests is performing whether to meet by the restriction of the subtask verified.
In a preferred implementation of the present embodiment, the preposition subtask of dependence verification for obtaining subtask, according to the dependence between described subtask and described preposition subtask, judges whether described subtask meets the condition of issuing.
It should be noted that, concrete issues in check logic, the order of various verification the order of the unalterable of non-critical, within all spirit in present embodiment and principle, the increasing of any step, delete and/or exchange, be all included within the method described in the present embodiment.
Issue unit 7013, be issued to described task execution device for chooser task from the set of subtask.
Through above-mentioned issue check logic verification after, sorted according to preset algorithm in the subtask met, first subtask be issued to the task execution device of described transmission task requests.
Particularly, sequence comprises: to each subtask in the set of described subtask according to number of attempt Bit-reversed, carry out order according to priority and sort, sort according to period type number sequence or sort according to order working time.
Result feedback unit 7014, for receiving the execution result that described task execution device returns, according to the attribute of the subtask issued described in execution result amendment.
The success of group tasks carrying, can remove subtask list and store separately by this subtask, or the attribute of amendment subtask, identifies the state of this subtask.If the latter, then the attribute of subtask also can comprise: the information such as subtask state and number of retries.When receiving the execution result that task execution device returns, according to the status information returning results amendment subtask.When running succeeded, sending the information that runs succeeded of subtask, when task scheduling apparatus receives the information that subtask runs succeeded, parsing subtask identifier, changing the state of this subtask in the list of subtask into success status (SUCCESSFUL).When performing unsuccessfully, sending subtask and performing failed information, when task scheduling apparatus receives the failed information of subtask execution, parse subtask and identifier, the number of retries of this subtask in the list of subtask is added 1.
In order to control the inefficiency that the too much subtask of the execution frequency of failure is directed at, also can limit the number of retries of subtask, when the number of retries of subtask reaches default threshold value, then no longer issuing this subtask.
The present embodiment also proposed a kind of server, comprising: display, one or more than one processor; Storer; And one or more than one program, wherein said more than one or one program is stored in described storer, and be configured to be performed by described more than one or one processor, described more than one or one routine package is containing the instruction for carrying out following operation:
Receive the task scheduling request that task execution device sends, wherein said task scheduling request comprises the identification information of task type and described task execution device;
According to described task scheduling request, according to issuing check logic, at least one subtask is verified, obtain the subtask set by verification, the attribute of wherein said subtask comprises: subtask identifier, the identifier of subtask type and affiliated task, and the attribute of task comprises: task identifier, task type, the subtask type of subtask is identical with the task type of the task belonging to described subtask;
From the set of described subtask, chooser task is issued to described task execution device;
Receive the execution result that described task execution device returns, according to the attribute of the subtask issued described in execution result amendment.
The present embodiment also proposed a kind of computer-readable recording medium, described computer-readable recording medium stores more than one or one program, described more than one or one program is used for execution distributed task dispatching method by one or more than one processor, and described method comprises:
Receive the task scheduling request that task execution device sends, wherein said task scheduling request comprises the identification information of task type and described task execution device;
According to described task scheduling request, according to issuing check logic, at least one subtask is verified, obtain the subtask set by verification, the attribute of wherein said subtask comprises: subtask identifier, the identifier of subtask type and affiliated task, and the attribute of task comprises: task identifier, task type, the subtask type of subtask is identical with the task type of the task belonging to described subtask;
From the set of described subtask, chooser task is issued to described task execution device;
Receive the execution result that described task execution device returns, according to the attribute of the subtask issued described in execution result amendment.
In the technical scheme of the distributed task dispatching device described in the present embodiment, collect by issuing verification sieve subtask is verified, obtain the subtask set by verification, meticulousr centralized management and scheduling can be carried out to the different task being applicable to different task actuating unit, the global association between different task can be realized, the dependence be applicable between the different task of different task actuating unit can be supported.
All or part of content in the technical scheme that above embodiment provides can be realized by software programming, and its software program is stored in the storage medium that can read, storage medium such as: the hard disk in computing machine, CD or floppy disk.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.