CN114327826A - Scheduler management method, device, equipment and storage medium - Google Patents

Scheduler management method, device, equipment and storage medium Download PDF

Info

Publication number
CN114327826A
CN114327826A CN202111626715.4A CN202111626715A CN114327826A CN 114327826 A CN114327826 A CN 114327826A CN 202111626715 A CN202111626715 A CN 202111626715A CN 114327826 A CN114327826 A CN 114327826A
Authority
CN
China
Prior art keywords
partition
scheduler
state
processable
management
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
CN202111626715.4A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202111626715.4A priority Critical patent/CN114327826A/en
Publication of CN114327826A publication Critical patent/CN114327826A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The embodiment of the application discloses a method, a device, equipment and a storage medium for managing a scheduler, which are applied to any scheduler in a scheduler cluster, wherein the method comprises the following steps: determining partition management requirements related to the scheduler cluster in the scheduler cluster; adjusting the processable partition of the self according to the partition management requirement; screening and calling batch programs according to the number segment range corresponding to the currently effective processable partition; by the technical scheme, the processable partitions of the schedulers in the scheduler cluster are adaptively adjusted based on the partition management requirement, and the availability of the scheduler cluster is improved.

Description

Scheduler management method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a scheduler management method, device, equipment and storage medium.
Background
Whether the application is the Internet application or the enterprise-level application, a large number of batch processing tasks are enriched, the dispersed batch processing tasks with poor reliability are brought into the unified batch scheduling platform, and the batch scheduling platform efficiently manages and integrates the batch tasks of the service system, so that the efficient and ordered operation of the batch tasks can be ensured. As the core of the batch scheduling platform, the availability of the scheduler cluster can directly influence the stable operation of batch tasks.
In the prior art, automatic management of the batch scheduler is mainly achieved by a conventional failover cluster manager. However, since the failover cluster manager belongs to a third-party system, the management mode is single and fixed, and there is a deficiency in the availability management of the scheduler cluster.
Therefore, there is a need for improvement in view of the problems in the prior art.
Disclosure of Invention
The application provides a scheduler management method, device, equipment and storage medium, so as to improve the availability of a scheduler cluster.
In a first aspect, an embodiment of the present application provides a scheduler management method, which is applied to any scheduler in a scheduler cluster, and the method includes:
determining partition management requirements related to the scheduler cluster in the scheduler cluster;
adjusting the processable partition of the self according to the partition management requirement;
and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
In a second aspect, an embodiment of the present application further provides a scheduler management apparatus, which is applied to any scheduler in a scheduler cluster, and the apparatus includes:
the partition requirement determining module is used for determining the partition management requirement related to the scheduler cluster in the scheduler cluster;
the processing partition adjusting module is used for adjusting the self processable partition according to the partition management requirement;
and the batch program calling module is used for screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
In a third aspect, an embodiment of the present application further provides an electronic device, where the device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any one of the scheduler management methods provided by the embodiments of the first aspect.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the scheduler management methods provided in the embodiments of the first aspect.
The embodiment of the application is applied to any scheduler in a scheduler cluster, and partition management requirements related to the scheduler cluster are determined; adjusting the processable partition of the self according to the partition management requirement; and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition. Through the technical scheme, each scheduler in the scheduler cluster can adaptively adjust the self-processable partition based on the partition management requirements related to the scheduler cluster, so that the scheduler cluster can automatically expand and contract and expand, the fault tolerance rate is high, and the availability of the whole scheduler cluster is improved.
Drawings
Fig. 1 is a flowchart of a scheduler management method according to an embodiment of the present application;
fig. 2 is a flowchart of a scheduler management method according to a second embodiment of the present application;
fig. 3 is a flowchart of a scheduler management method according to a third embodiment of the present application;
fig. 4 is a flowchart of a scheduler management method according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of a scheduler management apparatus according to a fifth embodiment of the present application;
fig. 6 is a schematic view of an electronic device according to a sixth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a scheduler management method according to an embodiment of the present application. The embodiment of the application is applicable to the situation of managing the batch schedulers in the batch scheduler cluster. The method may be performed by a scheduler management apparatus, which may be implemented by software and/or hardware, and is specifically configured in an electronic device, which may be a mobile terminal or a fixed terminal.
Referring to fig. 1, a scheduler management method provided in an embodiment of the present application is applied to any scheduler in a scheduler cluster, and includes:
s110, determining the partition management requirements related to the scheduler cluster.
In this embodiment, each scheduler may determine its own associated partition management requirements in the scheduler cluster. The batch scheduler cluster comprises at least one batch scheduler, the batch scheduler is responsible for automatically screening out batch programs meeting conditions and calling up and executing the batch programs according to a certain scheduling strategy, the batch scheduler can be called as a scheduler for short, and the partition management requirement can be a management requirement related to partition adjustment.
Specifically, the partition management requirements may include at least one of partition capacity requirements, scheduler upgrade requirements, and failover requirements for the failover scheduler from the number source partition to the newly added partition number segment. The partition capacity expansion requirement, the scheduler upgrading requirement and the fault transfer requirement are ordered partition management requirements, and corresponding processing time sequences are different for different partition management requirements. In this embodiment, the partition capacity expansion requirement needs to be processed first, and the failover requirement is the last processing, specifically, the partition capacity expansion requirement is before the scheduler upgrade requirement, and the scheduler upgrade requirement is before the failover requirement.
For example, taking partition capacity expansion requirement as an example, for a scheduler in a scheduler cluster, a number segment divided from a number segment range of a partition of the scheduler may be allocated to another scheduler in the scheduler cluster as a newly added partition, so as to implement flexible partition adjustment; for another example, taking the upgrade requirement of the scheduler as an example, the partition of the scheduler to be upgraded can be adjusted to other schedulers in the scheduler cluster for the scheduler to be upgraded in the scheduler cluster, and the partition is adjusted back after the scheduler to be upgraded is upgraded, so that rolling upgrade is realized, and the service is ensured not to be stopped; for another example, taking the failover requirement as an example, the partition of the failover scheduler may be adjusted to another scheduler in the scheduler cluster for the failover scheduler in the scheduler cluster, and after the failover scheduler is repaired, the other scheduler may wait for the redundant partition to be allocated to itself for processing, so as to implement automatic failover.
In this embodiment, the number of the batch program may be divided into a plurality of number segments based on a number segment range partitioning algorithm, and each number segment is used as a partition. For example, assuming there are A, B and C three partitions, the number segment range corresponding to each partition can be A00-A99, B00-B49 and C00-C19.
Each scheduler in the scheduler cluster may handle at least one partition when initially scheduled, e.g., one scheduler may handle one partition or two partitions, etc. The specific scheduler partition condition may set a corresponding partition for each scheduler in the scheduler cluster according to the actual demand and the use condition. Alternatively, each scheduler may process one partition at the time of initial scheduling.
And S120, adjusting the processable partition according to the partition management requirement.
In this embodiment, each scheduler may adjust its processable partition according to different partition management requirements. Specifically, in the working process of the scheduler, the processable partition of each scheduler in the scheduler cluster is not fixed, but can be adaptively adjusted according to the specific partition management requirement, so that the availability of the scheduler cluster can be improved.
S130, screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
In this embodiment, a scheduler partition field may be set for each scheduler, and the partition condition of the scheduler may be represented by the scheduler partition field, where the scheduler partition field may include a scheduler number, a partition number, a currently active partition, an upcoming active partition, a failed partition, and an active state of a partition, and the like.
Each scheduler can set a unique scheduler number, each partition can set a unique partition number, a current effective partition refers to a partition number which is currently effective by the scheduler, a partition to be effective refers to a partition number which is to be processed by the scheduler, a failed partition refers to a partition number which is processed by the scheduler before and is not processed at present, a partition effective state refers to a state whether the partition of the scheduler is effective or not, and the partition effective state comprises an effective state and a modified state.
In this embodiment, only when the partition validation state of the scheduler is valid, the batch program may be screened and invoked according to the number segment range corresponding to the currently valid partition of the scheduler. Specifically, the scheduler may screen out a qualified batch program from the batch programs corresponding to the number segment range according to batch services (including batch delivery service, payment due for personal loan, automatic payment for credit card, periodic automatic transfer, fund settlement and settlement processing, and the like), and call up and execute the batch program according to a certain scheduling policy, for example, call up and execute the batch program at a specified time.
The embodiment of the application is applied to any scheduler in a scheduler cluster, and partition management requirements related to the scheduler cluster are determined; adjusting the processable partition of the self according to the partition management requirement; and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition. Through the technical scheme, each scheduler in the scheduler cluster can adaptively adjust the self-processable partition based on the partition management requirements related to the scheduler cluster, so that the scheduler cluster can automatically expand and contract and expand, the fault tolerance rate is high, and the availability of the whole scheduler cluster is improved.
Example two
Fig. 2 is a flowchart of a scheduler management method according to a second embodiment of the present application, and this embodiment is an optimization of the above scheme based on the above embodiments.
Further, the partition management requirement comprises a partition capacity expansion requirement from a number source partition to a newly added partition number segment; correspondingly, the operation of adjusting the processable partition of the self according to the partition management requirement is refined into the operation of determining the partition to be managed associated with the partition management requirement; if the to-be-managed partition corresponds to the number source partition, adjusting the partition state of the to-be-managed partition to a modification state; and if the to-be-managed partition corresponds to the newly-added partition, adjusting the partition state of the to-be-managed partition to be the newly-added state, and executing corresponding adjustment operation on the partition which can be processed by the scheduler when the partition management requirement comprises a partition capacity expansion requirement.
Wherein explanations of the same or corresponding terms as those of the above-described embodiments are omitted.
Referring to fig. 2, the scheduler management method provided in this embodiment is applied to any scheduler in a scheduler cluster, and includes:
s210, determining partition management requirements related to the scheduler cluster; the partition management requirements comprise partition capacity expansion requirements from the number source partition to the newly added partition number segment.
In this embodiment, the scheduler to which the number source partition belongs and the scheduler to which the newly added partition belongs may be the same scheduler or different schedulers, and may be specifically determined according to actual requirements and use conditions.
And S220, determining the to-be-managed partition which is associated with the partition management requirement.
Specifically, the partitions of the scheduler may be scanned one by one to determine whether there is a partition to be managed associated with the partition management needs. For example, assuming that the scheduler 1 has two partitions (including partitions E and F), and the scheduler 2 is empty as the scheduler newly added to the scheduler cluster, at this time, a part of the number of segments of one partition, for example, partition E, in the scheduler 1 may be divided into the scheduler 2, and as the newly added partition of the scheduler 2, the partition of the scheduler 1 is processed by the scheduler 1 and the scheduler 2 together, so as to improve the processing capacity of the scheduler cluster on the bulk program as a whole.
And S230, if the to-be-managed partition corresponds to the number source partition, adjusting the partition state of the to-be-managed partition to a modification state.
In this embodiment, a partition field may be set for each partition, and the partition field includes a partition number, a partition range, and a partition status. The partition range represents the number segment range corresponding to the partition, the partition state represents whether the partition is in an effective state, and the partition state comprises three types of new addition, modification and effective state.
Continuing with the above example, the source partition refers to the E partition in scheduler 1, and for scheduler 1, the E partition is modified, so the partition status of the source partition can be adjusted to the modified status.
S240, if the partition to be managed corresponds to the newly added partition, adjusting the partition state of the partition to be managed to be in the newly added state.
Continuing with the above example, the newly added partition is the partition newly added in the scheduler 2, and the partition is newly added for the scheduler 2, so the partition status of the newly added partition can be adjusted to the newly added status.
And S250, screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
In this embodiment, after the partition of the scheduler is modified, it is necessary to determine whether the partition state of the scheduler is valid, and the scheduler continues processing only when the partition state of the partition is valid.
Optionally, the screening and invoking the batch program according to the number segment range corresponding to the currently valid processable partition includes: after a new scheduling period comes, judging whether the partition state of the current partition to be processed is a newly added state; if so, controlling to adjust the partition state of the current partition to be processed into an effective state according to the existence condition of the processable partition in the self modification state; and screening and calling batch programs according to the number segment range corresponding to the to-be-processed partition in the effective state.
Specifically, the screening and invoking a batch program according to the number segment range corresponding to the partition to be processed in the effective state includes: and if the partition effective state of the partition to be processed in the effective state is effective, screening the batch program and calling the batch program according to the number segment range corresponding to the partition to be processed in the partition effective state.
In this embodiment, if the partition state of the current partition to be processed is not the new state, the partition state of the current partition to be processed is directly set as the effective state.
Optionally, the controlling, according to the existence of the processable partition in the self-modification state, to set the partition state of the current partition to be processed as the valid state includes: if the processable partition in the modification state exists, acquiring the next processable partition as a new current partition to be processed, and continuing to execute the newly added state judgment operation; and if the processable partition in the modification state does not exist, directly setting the partition state of the current partition to be processed as an effective state.
In this embodiment, when it is determined that the partition state of the current partition to be processed by the scheduler is the newly added state, the partition states of other partitions of the scheduler need to be determined, if the partition states of other partitions of the scheduler are the modified state, the scheduling of the current partition to be processed is finished, and when the next round of scheduling is determined again, the next processable partition of the scheduler may be acquired as the new current partition to be processed.
It can be understood that, through the above operation, it can be ensured that the scheduler has been updated to a new number segment range, and no longer processes the previous number segment range, thereby preventing two schedulers from processing one number segment at the same time and causing repeated scheduling, and causing conflict.
On the basis of the above embodiments, when the partition management requirement includes a partition capacity expansion requirement, the embodiment of the present application executes an adjustment operation corresponding to a scheduler that can process a partition, and determines a partition to be managed, which is associated with the partition management requirement by itself; if the to-be-managed partition corresponds to the number source partition, adjusting the partition state of the to-be-managed partition to a modification state; and if the partition to be managed corresponds to the newly added partition, adjusting the partition state of the partition to be managed to be in a newly added state. By the technical scheme, under the capacity expansion scene, on-line automatic capacity expansion of the scheduler is realized based on the democratic autonomous cluster management without the central node, capacity expansion is realized without stop, and the management is more timely and efficient than manual management.
EXAMPLE III
Fig. 3 is a flowchart of a scheduler management method according to a third embodiment of the present application, and this embodiment is an optimization of the above scheme based on the above embodiments.
Further, the partition management requirements include scheduler upgrade requirements; correspondingly, the operation of adjusting the processable partition of the self according to the partition management requirement is refined into the operation of determining the partition to be managed associated with the upgrading requirement of the scheduler; if the self scheduler is a scheduler to be upgraded, removing the partition to be managed from the processable partition, and adjusting the effective state of the partition to be managed to be modified; and if the self scheduler takes over the scheduler for the partition of the scheduler to be upgraded, adding the partition to be managed to the self processable partition, adjusting the effective state of the partition to be managed to be modified, and executing corresponding adjustment operation on the partition processable by the scheduler when the partition management requirement comprises the scheduler upgrading requirement.
Wherein explanations of the same or corresponding terms as those of the above-described embodiments are omitted.
Referring to fig. 3, the scheduler management method provided in this embodiment is applied to any scheduler in a scheduler cluster, and includes:
s310, determining the partition management requirements related to the scheduler cluster; wherein the partition management requirements include scheduler upgrade requirements.
For example, assuming that the scheduler 3 has an upgrade requirement, the scheduler 3 acts as a scheduler to be upgraded and can adjust its partition to other schedulers in the scheduler cluster, such as scheduler 4, and the scheduler 4 can take over the scheduler as a partition. After the scheduler 3 finishes upgrading, the partitions can be adjusted back again.
And S320, determining the to-be-managed partition which is associated with the upgrading requirement of the scheduler.
In particular, the scheduler's partitions may be scanned one by one to determine if there is a partition to be managed associated with the scheduler upgrade requirement itself.
S330, if the self scheduler is the scheduler to be upgraded, the partition to be managed is removed from the processable partition, and the effective state of the partition to be managed is adjusted to be modified.
And the effective state of the partition to be managed is also the effective state of the partition to be managed.
S340, if the scheduler takes over the scheduler for the partition of the scheduler to be upgraded, the partition to be managed is added to the processable partition of the scheduler, and the effective state of the partition to be managed is adjusted to be modified.
And S350, screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
Specifically, the screening and invoking the batch program according to the number segment range corresponding to the currently valid processable partition includes: after a new scheduling period comes, if the self scheduler takes over the scheduler for the partition, determining whether the partition to be processed currently is unoccupied; if yes, acquiring the number segment range corresponding to the currently effective processable partition which is not occupied, screening the batch program and calling. And if the current partition to be processed is occupied, finishing scheduling the current partition to be processed.
Continuing with the above example as an example, after the new scheduling period comes, the scheduler 3 serves as a scheduler to be upgraded, the partition effective state of the scheduler to be upgraded is to be modified, the currently effective partition of the scheduler to be upgraded may be copied to the invalidated partition, the currently effective partition is set to be empty, and the partition effective state is updated to be effective. The scheduler 4 is used as a partition takeover scheduler, the partition effective state of the scheduler is to be modified, whether the partition to take over the scheduler to be effective is processed by other schedulers needs to be further judged, if the scheduler 3 does not release the partition, the scheduling of the current round is finished, repeated scheduling is prevented, and the next round of circulation is judged again. If no partition is being processed by other schedulers, the currently active partition of the partition takeover scheduler may be copied to the failed partition, the partition to be active may be copied to the currently active partition field, the partition active status may be updated to active, and subsequent processing uses the newly active partition.
On the basis of the above embodiment, when the partition management requirement includes a scheduler upgrade requirement, executing an adjustment operation corresponding to the scheduler processable partition, by determining a partition to be managed, which is associated with the scheduler upgrade requirement by itself; if the self scheduler is a scheduler to be upgraded, removing the partition to be managed from the processable partition, and adjusting the effective state of the partition to be managed to be modified; and if the self scheduler takes over the scheduler for the partition of the scheduler to be upgraded, adding the partition to be managed to the self processable partition, and adjusting the effective state of the partition to be managed to be modified. By the technical scheme, under the scheduler upgrading scene, based on the democratic autonomous cluster management without the central node, when a certain scheduler is upgraded, other schedulers can take over the partition in charge of the scheduler, the rolling upgrading without stopping service is realized, and the availability of the scheduler cluster is further improved.
Example four
Fig. 4 is a flowchart of a scheduler management method according to a fourth embodiment of the present application, and this embodiment is an optimization of the above scheme based on the foregoing embodiment.
Further, the partition management requirements include failover requirements for a failover scheduler; correspondingly, the operation of adjusting the processable partition of the operation according to the partition management requirement is detailed as adjusting the state of the scheduler of the fault scheduler to be a death state; adding a processable partition in the failover scheduler to its own processable partition ", and when the partition management requirements include a failover requirement for the failover scheduler, performing an adjustment operation for the corresponding processable partition.
Wherein explanations of the same or corresponding terms as those of the above-described embodiments are omitted.
Referring to fig. 4, the scheduler management method provided in this embodiment is applied to any scheduler in a scheduler cluster, and includes:
s410, determining partition management requirements related to the scheduler cluster; wherein the partition management requirements include failover requirements for the failover scheduler.
In this embodiment, each scheduler in the scheduler cluster performs democratic autonomous management, and each scheduler may supervise each other, and when a scheduler fails, other schedulers may take over the partition for which the scheduler is responsible. For example, when the scheduler 5 fails, other schedulers in the scheduler cluster, such as the scheduler 6, may check the working status of the scheduler, may issue an alarm message when the scheduler 5 fails, and the scheduler 6 may also take over the partition processed by the scheduler 5.
And S420, adjusting the scheduler state of the fault scheduler to be a death state.
The failure scheduler refers to a scheduler with a problem in an operation state.
Specifically, a scheduler status field may be set for each scheduler, and the Running status of the scheduler is represented by the scheduler status field, and the scheduler status field may include a Running status (Running), an Offline status (Offline), a Dead status (Dead), and the like.
In this embodiment, after a new scheduling period comes, based on a traversal detection manner, the first scheduler in the scheduler cluster may monitor the heartbeat time of the second scheduler in the scheduler cluster, and adjust the operating state of the second scheduler according to a time difference between the heartbeat time of the first scheduler and the heartbeat time of the second scheduler. The first scheduler is a scheduler with a working state, when the heartbeat detection result is successful, the first scheduler can update the heartbeat time of the first scheduler and adjust the running state of the first scheduler to be the working state, and when the heartbeat detection result is failed, the working state of the first scheduler cannot be adjusted; the second scheduler refers to other schedulers in the scheduler cluster, for example, all schedulers except the first scheduler may be used, and of course, some specified schedulers in the scheduler cluster may also be set as other schedulers according to actual needs and use cases.
Specifically, when the time difference exceeds the first set time threshold and the operating state of the second scheduler is an offline state, the operating state of the second scheduler may be adjusted to a death state; when the time difference exceeds a second set time threshold and the running state of the second scheduler is a working state, the running state of the second scheduler can be adjusted to be an offline state; the second set time threshold is not greater than the first set time threshold, for example, the first set time threshold may be 10 minutes, and the second set time threshold may be 5 minutes.
In this embodiment, each scheduler in the scheduler cluster may store the heartbeat detection result including information such as heartbeat time in the background database at regular time, and meanwhile, each scheduler may obtain the heartbeat detection results of other schedulers such as heartbeat time from the background database at regular time to monitor the operating states of the other schedulers.
Optionally, while adjusting the scheduler status of the faulty scheduler to the extinction status, an optimistic lock including the faulty scheduler may also be sent to other schedulers to prohibit the other schedulers from adjusting the extinction status of the faulty scheduler.
It can be understood that through optimistic locking, the condition that a plurality of schedulers simultaneously adjust the state of the failure scheduler is avoided, and the concurrence of transaction processing is improved.
And S430, adding the processable partition in the fault scheduler to the processable partition.
In this embodiment, in the process of adjusting the operating states of the other schedulers, if the adjustment fails, the processable partition in the faulty scheduler is not added to the processable partition itself.
S440, screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
In this embodiment, after the faulty scheduler is repaired, the running state of the faulty scheduler may be modified to a working state, and at this time, the partition condition of the faulty scheduler may be determined, and if the partition is empty, the target scheduler in the scheduler cluster may wait for the redundant partition to be allocated to the faulty scheduler for processing, and specifically, at least one partition to be transferred may be taken over from the partition space of the target scheduler; wherein the target scheduler may be determined according to the following drop pattern: counting the load size of the partition space of all schedulers in the scheduler cluster; according to the statistical result, the scheduler with the largest load is taken as the target scheduler, and meanwhile, one partition in the target scheduler can be taken as the partition to be transferred.
On the basis of the above embodiment, when the partition management requirement includes a failover requirement for the fault scheduler, the embodiment of the present application executes an adjustment operation that the corresponding scheduler can process the partition, by adjusting the scheduler state of the fault scheduler to a deactivation state; the processable partition in the failover scheduler is added to its own processable partition. According to the technical scheme, under a scheduler fault scene, based on the democratic autonomous cluster management without the central node, when a scheduler fails, other schedulers can take over the partition in charge of the scheduler, manual adjustment is not needed, only automatic fault transfer processing of the cluster is needed, the failure can be stopped, the rapid handling capacity of the cluster fault is enhanced, the availability of the scheduler cluster is further improved, and the fault probability of the whole cluster is reduced.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a scheduler management apparatus according to a fifth embodiment of the present application. Referring to fig. 5, an apparatus for managing a scheduler provided in an embodiment of the present application is applied to any scheduler in a scheduler cluster, and the apparatus includes: a partition requirement determination module 510, a processing partition adjustment module 520, and a batch program invocation module 530.
A partition requirement determining module 510, configured to determine a partition management requirement related to itself in the scheduler cluster;
a processing partition adjusting module 520, configured to adjust a processable partition according to the partition management requirement;
and a batch program invoking module 530, configured to filter and invoke a batch program according to the number segment range corresponding to the currently valid processable partition.
The embodiment of the application is applied to any scheduler in a scheduler cluster, and partition management requirements related to the scheduler cluster are determined; adjusting the processable partition of the self according to the partition management requirement; and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition. Through the technical scheme, each scheduler in the scheduler cluster can adaptively adjust the self-processable partition based on the partition management requirements related to the scheduler cluster, so that the scheduler cluster can automatically expand and contract and expand, the fault tolerance rate is high, and the availability of the whole scheduler cluster is improved.
Further, the partition management requirement comprises a partition capacity expansion requirement from a number source partition to a newly added partition number segment;
accordingly, the processing partition adjusting module 520 includes:
the management partition determining unit is used for determining the partition to be managed, which is associated with the partition management requirement;
a number source partition judging unit, configured to adjust a partition state of the to-be-managed partition to a modified state if the to-be-managed partition corresponds to the number source partition;
and the newly added partition judging unit is used for adjusting the partition state of the partition to be managed into a newly added state if the partition to be managed corresponds to the newly added partition.
Further, the batch procedure call-up module 530 includes:
the partition state judging unit is used for judging whether the partition state of the current partition to be processed is a newly added state or not after a new scheduling period comes;
the partition state adjusting unit is used for controlling the partition state of the current partition to be processed to be adjusted into an effective state according to the existence condition of the processable partition in the self modification state if the partition state adjusting unit is in the effective state;
and the batch program calling unit is used for screening and calling batch programs according to the number segment range corresponding to the to-be-processed partition in the effective state.
Further, the partition management requirements include scheduler upgrade requirements;
accordingly, the processing partition adjusting module 520 includes:
the upgrading partition determining unit is used for determining the partition to be managed, which is associated with the upgrading requirement of the scheduler;
the partition removing unit is used for removing the partition to be managed from the processable partition if the self scheduler is a scheduler to be upgraded and adjusting the effective state of the partition to be managed to be modified;
and the partition adding unit is used for adding the partition to be managed to the self-processable partition and adjusting the effective state of the partition to be managed to be modified if the self scheduler takes over the scheduler for the partition of the scheduler to be upgraded.
Further, the batch procedure call-up module 530 includes:
the partition occupation judging unit is used for determining whether the current partition to be processed is unoccupied or not if the self scheduler is the partition takeover scheduler after a new scheduling period comes;
and the unoccupied partition determining unit is used for acquiring the number segment range corresponding to the unoccupied currently effective processable partition if the unoccupied partition determining unit is used, screening the batch program and calling up the batch program.
Further, the partition management requirements include failover requirements for a failover scheduler;
accordingly, the processing partition adjusting module 520 includes:
a scheduler state adjustment unit for adjusting the scheduler state of the fault scheduler to a extinction state;
a partition takeover unit for adding a processable partition in the failover scheduler to its processable partition.
Further, the apparatus further comprises:
and the optimistic lock triggering unit is used for sending an optimistic lock comprising the fault scheduler to other schedulers when the scheduler state of the fault scheduler is adjusted to be the extinction state so as to prohibit the other schedulers from adjusting the extinction state of the fault scheduler.
The scheduler management device provided by the embodiment of the application can execute the scheduler management method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a structural diagram of an electronic device according to a sixth embodiment of the present application. FIG. 6 illustrates a block diagram of an exemplary electronic device 612 suitable for use in implementing embodiments of the present application. The electronic device 612 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 612 is in the form of a general purpose computing device. The components of the electronic device 612 may include, but are not limited to: one or more processors or processing units 616, a system memory 628, and a bus 618 that couples various system components including the system memory 628 and the processing unit 616.
Bus 618 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 612 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 612 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 628 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)630 and/or cache memory 632. The electronic device 612 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 634 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 618 by one or more data media interfaces. System memory 628 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 640 having a set (at least one) of program modules 642 may be stored, for example, in system memory 628, such program modules 642 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 642 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 612 may also communicate with one or more external devices 614 (e.g., keyboard, pointing device, display 624, etc.), with one or more devices that enable a user to interact with the electronic device 612, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 612 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 622. Also, the electronic device 612 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 620. As shown, the network adapter 620 communicates with the other modules of the electronic device 612 via the bus 618. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with the electronic device 612, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 616 executes various functional applications and data processing by executing at least one of other programs of the plurality of programs stored in the system memory 628, for example, to implement any of the scheduler management methods provided in the embodiments of the present application.
EXAMPLE seven
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a scheduler management method provided in any embodiment of the present application, and the method applied to any scheduler in a scheduler cluster includes: determining partition management requirements related to the scheduler cluster in the scheduler cluster; adjusting the processable partition of the self according to the partition management requirement; and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It should be noted that, in the embodiment of the scheduler management apparatus, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A scheduler management method applied to any scheduler in a scheduler cluster, comprising:
determining partition management requirements related to the scheduler cluster in the scheduler cluster;
adjusting the processable partition of the self according to the partition management requirement;
and screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
2. The method of claim 1, wherein the partition management requirement comprises a partition capacity expansion requirement from a number source partition to a newly added partition number segment;
correspondingly, the adjusting the processable partition according to the partition management requirement includes:
determining a to-be-managed partition which is associated with the partition management requirement;
if the to-be-managed partition corresponds to the number source partition, adjusting the partition state of the to-be-managed partition to a modification state;
and if the partition to be managed corresponds to the newly added partition, adjusting the partition state of the partition to be managed to be in a newly added state.
3. The method of claim 2, wherein the screening and invoking the batch program according to the number segment range corresponding to the currently active processable partition comprises:
after a new scheduling period comes, judging whether the partition state of the current partition to be processed is a newly added state;
if so, controlling to adjust the partition state of the current partition to be processed into an effective state according to the existence condition of the processable partition in the self modification state;
and screening and calling batch programs according to the number segment range corresponding to the to-be-processed partition in the effective state.
4. The method of claim 1, wherein the partition management requirements comprise scheduler upgrade requirements;
correspondingly, the adjusting the processable partition according to the partition management requirement includes:
determining a to-be-managed partition which is associated with the upgrading requirement of the scheduler;
if the self scheduler is a scheduler to be upgraded, removing the partition to be managed from the processable partition, and adjusting the effective state of the partition to be managed to be modified;
and if the self scheduler takes over the scheduler for the partition of the scheduler to be upgraded, adding the partition to be managed to the self processable partition, and adjusting the effective state of the partition to be managed to be modified.
5. The method of claim 4, wherein the screening and invoking the batch program according to the number segment range corresponding to the currently active processable partition comprises:
after a new scheduling period comes, if the self scheduler takes over the scheduler for the partition, determining whether the partition to be processed currently is unoccupied;
if yes, acquiring the number segment range corresponding to the currently effective processable partition which is not occupied, screening the batch program and calling.
6. The method of claim 1, wherein the partition management requirements comprise failover requirements for a failover scheduler;
correspondingly, the adjusting the processable partition according to the partition management requirement includes:
adjusting a scheduler state of the fault scheduler to a deactivation state;
adding a processable partition in the failover scheduler to its own processable partition.
7. The method of claim 6, wherein while said adjusting the scheduler state of the scheduler of the fault to a deactivated state, the method further comprises:
send an optimistic lock including the faulty scheduler to other schedulers to prohibit adjustment of the extinction state of the faulty scheduler by the other schedulers.
8. A scheduler management apparatus, applied to any scheduler in a scheduler cluster, comprising:
the partition requirement determining module is used for determining the partition management requirement related to the scheduler cluster in the scheduler cluster;
the processing partition adjusting module is used for adjusting the self processable partition according to the partition management requirement;
and the batch program calling module is used for screening and calling the batch programs according to the number segment range corresponding to the currently effective processable partition.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a scheduler management method as recited in any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a scheduler management method according to any one of claims 1-7.
CN202111626715.4A 2021-12-28 2021-12-28 Scheduler management method, device, equipment and storage medium Pending CN114327826A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111626715.4A CN114327826A (en) 2021-12-28 2021-12-28 Scheduler management method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111626715.4A CN114327826A (en) 2021-12-28 2021-12-28 Scheduler management method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114327826A true CN114327826A (en) 2022-04-12

Family

ID=81015437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111626715.4A Pending CN114327826A (en) 2021-12-28 2021-12-28 Scheduler management method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114327826A (en)

Similar Documents

Publication Publication Date Title
EP1654645B1 (en) Fast application notification in a clustered computing system
US20050283673A1 (en) Information processing apparatus, information processing method, and program
US20050187982A1 (en) Method and device for acquiring snapshots and computer system with snapshot acquiring function
US20100268983A1 (en) Computer System and Method of Control thereof
WO2006125391A1 (en) A computer processing system for achieving data upgrading and a data upgrading method
EP2645635B1 (en) Cluster monitor, method for monitoring a cluster, and computer-readable recording medium
US8132174B2 (en) Concurrency management in cluster computing of business applications
US7228545B2 (en) Methods and apparatus for managing the execution of a task among a plurality of autonomous processes
US7574439B2 (en) Managing a nested request
CN115544044A (en) Data consistency keeping method, device, equipment and storage medium
CN116185623A (en) Task allocation method and device, electronic equipment and storage medium
US10928883B2 (en) System management device
US20070174836A1 (en) System for controlling computer and method therefor
US9910893B2 (en) Failover and resume when using ordered sequences in a multi-instance database environment
CN113590320A (en) Resource processing method, device, equipment and medium for distributed batch task scheduling
CN114327826A (en) Scheduler management method, device, equipment and storage medium
CN110275772B (en) Data processing method and related equipment thereof
CN115629920A (en) Data request exception handling method and device and computer readable storage medium
US20020116506A1 (en) Cross-MVS system serialized device control
CN114036164A (en) High-concurrency transaction locking method and system combining optimistic lock and pessimistic lock
CN114168180A (en) Updating method, computing device, electronic device and storage medium
CN114820218A (en) Content operation method, device, server and storage medium
CN114116203A (en) Resource calling control method, resource calling control device and storage medium
CN114415981A (en) IO processing method and system of multi-control storage system and related components
CN113342511A (en) Distributed task management system and method

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