CN106502787B - A kind of dispatching method and device - Google Patents

A kind of dispatching method and device Download PDF

Info

Publication number
CN106502787B
CN106502787B CN201610879321.2A CN201610879321A CN106502787B CN 106502787 B CN106502787 B CN 106502787B CN 201610879321 A CN201610879321 A CN 201610879321A CN 106502787 B CN106502787 B CN 106502787B
Authority
CN
China
Prior art keywords
scheduler
scheduling
adapter
event
mark
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.)
Active
Application number
CN201610879321.2A
Other languages
Chinese (zh)
Other versions
CN106502787A (en
Inventor
孙勐
陈敬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610879321.2A priority Critical patent/CN106502787B/en
Publication of CN106502787A publication Critical patent/CN106502787A/en
Application granted granted Critical
Publication of CN106502787B publication Critical patent/CN106502787B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload

Abstract

A kind of dispatching method and device, are related to field of cloud calculation, solve the problems, such as the automation demanding that cannot achieve scheduling of resource under cloud scene.The dispatching method includes: the event notice that the first scheduler adapter receives the first scheduler dispatches, and sends event notice to scheduling engine, and event notice includes the mark that event and object corresponding with the event that occurred has occurred that the first scheduler is completed;Scheduling engine obtains the mark of pending scheduling operation corresponding with the event that occurred and the second scheduler respectively from policy library;Scheduling engine sends the mark of pending scheduling operation, the mark of object and the second scheduler to the second scheduler adapter;Second scheduler adapter carries the notification message of the mark of pending scheduling operation and object to the second scheduler dispatches, to notify the second scheduler to complete pending scheduling operation according to the mark of object.

Description

A kind of dispatching method and device
Technical field
The present invention relates to field of cloud calculation more particularly to a kind of dispatching methods and device.
Background technique
Cloud computing (English: cloud computing) is the increase of related service Internet-based, uses and deliver mould Formula provides the resource of dynamic, easily extension, virtualization by internet.
In existing field of cloud calculation, the centralized dispatching and granting to infrastructure resources are had been realized in, for example, can be with United Dispatching is realized to resources of virtual machine by the scheduler of virtualization software.Infrastructure resources are deposited in a manner of node resource Node resource includes physical server resource, virtual machine, container or similar logic calculation resource.On each node resource Equal application deployment or middleware, application or middleware exist in a manner of process resource, process resource can for database into Journey, the component processes of application or any other resources that there is operation in a manner of process.
For node resource and process resource, the variation of a certain resource will lead to the variation of another resource, that is, It says, there are two-way linkages for the scheduling of node resource and the scheduling of process resource.For example, being needed when increasing a node resource newly Certain process resources are disposed and start on newly-increased node resource, to run business;Occur in the process resource of some application Failure, and when the process can not repair, need to restart the node resource or be again the process distribution node that the process is belonged to Resource.But in the prior art, the two-way linkage between node resource and process resource needs to be manually operated, and cannot achieve cloud The automation demanding of scheduling of resource under scene.
Summary of the invention
The present invention provides a kind of dispatching method and device, is able to solve the automation that cannot achieve scheduling of resource under cloud scene The problem of demand.
In a first aspect, providing a kind of dispatching device, the dispatching device is suitable including the first scheduler adapter, the second scheduler Orchestration and scheduling engine, above-mentioned first scheduler adapter and above-mentioned second scheduler adapter respectively with above-mentioned scheduling engine Connection, and above-mentioned first scheduler adapter and above-mentioned second scheduler adapter are different types of scheduler adapter.Tool Body, above-mentioned first scheduler adapter, for receive the first corresponding scheduler dispatches include occurred event with And the event notice of the mark of object corresponding with the event that occurred, and event notice is sent to above-mentioned scheduling engine;It is above-mentioned Scheduling engine, the event notice sent for receiving above-mentioned first scheduler adapter, and obtain from policy library respectively and The mark of the corresponding pending scheduling operation of generation event and the second scheduler, then sent to above-mentioned second scheduler adapter The mark of pending scheduling operation, the mark of object and the second scheduler, policy library are stored with the event of generation, pending tune Corresponding relationship between degree operation and the mark of the second scheduler, pending scheduling operation and above-mentioned second scheduler adapter pair It answers;Above-mentioned second scheduler adapter, for receive the mark of pending scheduling operation, object that above-mentioned scheduling engine sends with And second the mark of scheduler carry pending scheduling operation to the second scheduler dispatches and according to the mark of the second scheduler With the notification message of the mark of object, to notify the second scheduler to complete pending scheduling operation according to the mark of object.
Due to including being stored with the event of generation, pending scheduling operation and second in the scheduling engine of the embodiment of the present invention The policy library of corresponding relationship between the mark of scheduler, and pending scheduling operation is corresponding with the second scheduler adapter, because This, scheduling engine can get according to the policy library and send out with this after receiving the event for carrying the event that occurred notice The corresponding pending scheduling operation of part of making trouble, and the second scheduler adapter is notified to trigger the second scheduler and complete pending scheduling Operation realizes the two-way linkage of scheduling of resource, and without manual operation, the automation for meeting scheduling of resource under cloud scene is needed It asks.
Optionally, in a kind of possible implementation of the embodiment of the present invention, above-mentioned first scheduler adapter is section Point scheduler adapter, above-mentioned first scheduler are node scheduling device, and above-mentioned second scheduler adapter is suitable for process scheduler Orchestration, above-mentioned second scheduler are process scheduler;Alternatively, above-mentioned first scheduler adapter is process scheduler adapter, Above-mentioned first scheduler is process scheduler, and above-mentioned second scheduler adapter is node scheduling device adapter, and above-mentioned second adjusts Degree device is node scheduling device.
As can be seen that the first scheduler adapter can be process scheduler adapter, or node scheduling device is suitable Orchestration, therefore, the variation that process resource may be implemented in dispatching device provided in an embodiment of the present invention cause the variation of node resource, Also the variation that node resource may be implemented causes the variation of process resource, realizes the scheduling of node resource and the tune of process resource The two-way linkage of degree.
Optionally, in the alternatively possible implementation of the embodiment of the present invention, above-mentioned first scheduler adapter, also The first registration information is sent for obtaining the first registration information, and to above-mentioned scheduling engine, the first registration information can including first Corresponding relationship between the feature of execution event, the first executable scheduling operation and the first equipment, the first executable event are The pending event of first scheduler, and the first executable event triggers the first equipment and completes the first executable scheduling operation, the The feature of one equipment includes the mark of the second scheduler;Above-mentioned second scheduler adapter, is also used to obtain the second registration information, And the second registration information is sent to above-mentioned scheduling engine, the second registration information includes the second executable event, the second executable tune Corresponding relationship between degree operation and the feature of the second equipment, the second executable event are the pending thing of the second scheduler Part, and the second executable event triggers the second equipment and completes the second executable scheduling operation, the feature of the second equipment includes first The mark of scheduler;Above-mentioned scheduling engine, the first registration letter sent for receiving and storing above-mentioned first scheduler adapter Breath, and the second registration information that above-mentioned second scheduler adapter is sent is received and stored, with generation strategy library.
Scheduler adapter dynamic registration scheduler corresponding with the scheduler adapter in the embodiment of the present invention can be real Therefore the scheduling of existing resource couples between dispatching device provided in an embodiment of the present invention and scheduler without technology, need to only connect Mouth calls the dynamic dispatching that resource can be realized.
Optionally, in the alternatively possible implementation of the embodiment of the present invention, on the feature of the first equipment further includes The mark of the second scheduler adapter is stated, the feature of the second equipment further includes the mark of above-mentioned first scheduler adapter.
If the feature of the first equipment further includes the mark of the second scheduler adapter, the feature of the second equipment further includes above-mentioned The mark of first scheduler adapter, the then corresponding relationship stored in the policy library in scheduling engine include that the first scheduler is suitable It is accurately determining logical with which scheduler adapter to be conducive to scheduling engine for the mark of the mark of orchestration or the second scheduler adapter Letter.
Second aspect provides a kind of dispatching method, which is applied to such as above-mentioned first aspect and its various possibility Any one of implementation described in dispatching device.Specifically, firstly, the first scheduler adapter receive it is corresponding The events of first scheduler dispatches notifies, and sends event notice to scheduling engine, event notice include the event that occurred and The mark of object corresponding with the event that occurred;Then, scheduling engine obtains corresponding with event has occurred respectively from policy library Pending scheduling operation and the second scheduler mark, and to the second scheduler adapter send pending scheduling operation, The mark of the mark of object and the second scheduler, policy library are stored with pair between the event of generation and pending scheduling operation It should be related to, pending scheduling operation is corresponding with the second scheduler adapter;Finally, the second scheduler adapter is according to the second scheduling The mark of device carries the notification message of the mark of pending scheduling operation and object to the second scheduler dispatches, to notify second Scheduler completes pending scheduling operation according to the mark of object.
Further, in an implementation of the embodiment of the present invention, the first scheduler adapter receives the first scheduling Before the event notice that device is sent, the first scheduling adapter also obtains the first registration information, and sends the first note to scheduling engine Volume information, the first registration information include the first executable event, the first executable scheduling operation and the first equipment feature it Between corresponding relationship, the first executable event is the pending event of the first scheduler, and the first executable event triggering first Equipment completes the first executable scheduling operation, and the feature of the first equipment includes the mark of the second scheduler;Second scheduler adaptation Device also obtains the second registration information, and sends the second registration information to scheduling engine, and the second registration information includes second executable Corresponding relationship between the feature of event, the second executable scheduling operation and the second equipment, the second executable event are second The pending event of scheduler, and the second executable event triggers the second equipment and completes the second executable scheduling operation, second sets Standby feature includes the mark of the first scheduler;Scheduling engine also stores the first registration information and the second registration information, to generate Policy library.
Further, in an implementation of the embodiment of the present invention, the feature of the first equipment further includes the second scheduling The mark of device adapter, the feature of the second equipment further include the mark of the first scheduler adapter.
Further, in an implementation of the embodiment of the present invention, the first scheduler adapter is node scheduling device Adapter, the first scheduler are node scheduling device, and the second scheduler adapter is process scheduler adapter, and the second scheduler is Process scheduler;Alternatively, the first scheduler adapter is process scheduler adapter, the first scheduler is process scheduler, the Two scheduler adapters are node scheduling device adapter, and the second scheduler is node scheduling device.
In embodiments of the present invention, the name of above-mentioned dispatching device does not constitute restriction, In to equipment or functional module itself In practical realization, these equipment or functional module can occur with other titles.As long as the function of each equipment or functional module It is similar with the embodiment of the present invention, within the scope of the claims of the present invention and its equivalent technology.
The specific descriptions of second aspect of the embodiment of the present invention and its various implementations, can be with reference to first aspect and its each Detailed description in kind implementation;Also, the beneficial effect of second aspect and its various implementations can refer to first party Beneficial effect analysis in face and its various implementations, details are not described herein again.
These aspects or other aspects of the embodiment of the present invention in the following description can more straightforwards.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of inventive embodiments.
Fig. 1 is the structural schematic diagram of node resource and process resource in the prior art;
Fig. 2 be node resource scheduling influence the course resource scheduling flow diagram;
Fig. 3 is the flow diagram that the scheduling of process resource influences the scheduling of node resource;
Fig. 4 is the structural schematic diagram of scheduling system provided in an embodiment of the present invention;
Fig. 5 is the flow diagram one of dispatching method provided in an embodiment of the present invention;
Fig. 6 is the flow diagram two of dispatching method provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram that MongoDB is extended in the embodiment of the present invention;
Fig. 8 is the flow diagram one that the embodiment of the present invention executes dispatching method in extension MongoDB;
Fig. 9 is the flow diagram two that the embodiment of the present invention executes dispatching method in extension MongoDB;
Figure 10 is the structural schematic diagram of dispatching device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is retouched in detail It states.
In being described below, for illustration and not for limitation, propose such as specific system structure, interface, technology it The detail of class understands the embodiment of the present invention to cut thoroughly.However, it will be clear to one skilled in the art that there is no this The embodiment of the present invention also may be implemented in the other embodiments of a little details.In other situations, it omits to well-known The detailed description of apparatus, circuit and method, in case unnecessary details interferes the description of the embodiment of the present invention.
Wherein, term "and/or" in the embodiment of the present invention, only a kind of incidence relation for describing affiliated partner, indicates There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three Situation.
Term " first " and " second " in description and claims of this specification and above-mentioned attached drawing etc. are for area Not different objects, rather than for limiting particular order.
To facilitate understanding of the present embodiment of the invention, the relevant factor that can be introduced in the embodiment of the present invention is introduced herein first.
Node resource refers to such as physical server resource, virtual machine, container or similar logic calculation resource.
Node level scheduling refers to scheduling by the scheduler of virtualization software to node resource, including creation, inquires, opens Dynamic, stopping, destruction etc..Wherein, to realize that the scheduler of scheduling node resource is known as node scheduling device.
Process resource refers to the application disposed on node resource or middleware, such as the component of database process, application Process or any other resources that there is operation in a manner of process.
Process level scheduling refers to scheduling by the scheduler of virtualization software to process resource, including creation, inquires, opens Dynamic, stopping, destruction etc..Wherein, to realize that the scheduler of scheduling process resource is known as process scheduler.
Scheduling refers under specific resource environment, carries out resource dispensing using rule according to certain resource, places (English Text: placement) and configure process.
Event refers to a certain scheduling that node scheduling device or process scheduler are completed, such as the newly-built section of node scheduling device Point resource, process scheduler terminate a certain process resource.
Scheduling operation refers to the related scheduling of event triggering, for example, if event is newly-built node resource, event triggering Disposed on newly-built node resource and start certain process resources, here, disposed on newly-built node resource and start it is certain into Cheng Ziyuan is scheduling operation.
As shown in Figure 1, being deployed at least one process resource on each node resource in existing field of cloud calculation, save Point scheduler can be with United Dispatching node resource, and process scheduler can United Dispatching process resource.
There are two-way linkages for node level scheduling and process level scheduling, that is to say, that the variation of a certain resource will lead to another The variation of resource.For example, in conjunction with Fig. 1, as shown in Fig. 2, process scheduler needs when node scheduling device increases a node resource newly Certain process resources are disposed and start on newly-increased node resource, to run business.In conjunction with Fig. 1, as shown in figure 3, at some The process failure of application, and when process scheduler can not be repaired, node scheduling device needs to restart the node money that the process is belonged to Source is the process distribution node resource again.
In the prior art, there are the single-way linkages that node level is dispatched to process level scheduling, but and there is no support process level It is dispatched to the linkage of node level scheduling.For example, Apache (English: Apache HTTP Server, referred to as: Apache) open source Famous DCOS frame Mesos only supports the single-way linkage that process level scheduling is dispatched to from node level, does not support from process level tune Spend the reversed linkage of node level scheduling.Currently, the two-way linkage between node level scheduling and process level scheduling needs behaviour manually Work is just able to achieve, and leads to not the automation demanding for realizing scheduling of resource under cloud scene in this way.
In order to solve the problems, such as to cannot achieve the automation demanding of scheduling of resource under cloud scene in the prior art, the present invention is real It applies example and a kind of dispatching method is provided, introduced in existing cloud scene suitable including the first scheduler adapter, the second scheduler The dispatching device of orchestration and scheduling engine, and the first scheduler adapter and the second scheduler adapter belong to different type, it should Scheduling engine includes the plan of the corresponding relationship between the event that is stored with, the feature of the equipment of scheduling operation and completion scheduling operation Slightly library, in this way, scheduling engine can be got according to policy library with it is a certain occurred the corresponding pending scheduling operation of event and The feature of equipment, and then trigger the equipment and complete pending scheduling operation.Due to the first scheduler adapter and the second scheduler Adapter belongs to different type, and therefore, the first scheduler adapter can be suitable for node scheduling device adapter and process scheduler One of them in orchestration, the second scheduler are another in node scheduling device adapter and process scheduler adapter. In this way, dispatching method provided in an embodiment of the present invention can be realized the two-way linkage between process level scheduling and node level scheduling, And without manual operation, the automation demanding of scheduling of resource under cloud scene is met.
Dispatching method provided in an embodiment of the present invention is applied to scheduling system.Fig. 4 is scheduling provided in an embodiment of the present invention The structural schematic diagram of system.Referring to fig. 4, which includes dispatching device 40, at least one first scheduler 41 and extremely Few second scheduler 42.Wherein, dispatching device 40 includes the first scheduler adapter 401, scheduling engine 402 and the second tune Device adapter 403 is spent, the first scheduler adapter 401 and the second scheduler adapter 403 belong to different type, and each first adjusts Degree device 41 is connect with the first scheduler adapter 401, and each second scheduler 42 connects with the second scheduler adapter 403 It connects.
The first scheduler 41 that first scheduler adapter 401 is used for and is connected with the first scheduler adapter 401 Communication, the scheduling engine 402 for being also used to and being connected with the first scheduler adapter 401 communicate.
The second scheduler 42 that second scheduler adapter 403 is used for and is connected with the second scheduler adapter 403 Communication, the scheduling engine 402 for being also used to and being connected with the second scheduler adapter 403 communicate.
Scheduling engine 402 includes receiving unit 4020, storage unit 4021, processing unit 4022 and transmission unit 4023.Receiving unit 4020 be used for receives the first scheduler adapter 401 or the second scheduler adapter 403 transmission event, Corresponding relationship between the feature of the equipment of scheduling operation and completion scheduling operation, storage unit 4021 receive list for storing 4020 corresponding relationships that receive of member, processing unit 4022 have occurred the corresponding scheduling operation of event with a certain for obtaining, have sent out Send unit 4023 for sending the scheduling operation that processing unit is got.Storage unit 4021 includes policy library 4024, the strategy Library 4024 includes the corresponding relationship between event, the feature of the equipment of scheduling operation and completion scheduling operation.Wherein, event can Think the pending event of the first scheduler 41, or the pending event of the second scheduler 42, the embodiment of the present invention pair This is not especially limited.
Policy library 4024 can store in scheduling engine 402 in table form.Illustratively, if completing scheduling operation Equipment feature be scheduler mark, then include event, scheduling operation and complete scheduling operation scheduler mark Between corresponding relationship policy library 1024 format it is as shown in table 1.
Table 1
Event Scheduling operation The mark of scheduler
Newly-built node Process A is created on newly-built node II
Process B failure Restart node C XX
…… …… ……
In table 1, if event is newly-built node, equipment II is needed to create process A on newly-built node;If process B failure, Equipment XX triggering node C is then needed to restart.
It should be noted that table 1 only illustrates event, scheduling operation and the tune for completing scheduling operation in table form Storage form of the corresponding relationship in scheduling engine 402 between the mark of device is spent, is not to event, scheduling operation and complete At the restriction of storage form of the corresponding relationship between the mark of the scheduler of scheduling operation in scheduling engine 402, certainly, on Stating storage form of the corresponding relationship in scheduling engine 402 can also be stored in the form of other, the embodiment of the present invention to this not It limits.
Optionally, the mark for completing the equipment of scheduling operation can also include the mark of scheduler adapter.In this way, scheduling Engine 402 more convenient, can be determined rapidly and which scheduler adapter communications according to the policy library 1024.
Illustratively, in conjunction with table 1, if the feature for completing the equipment of scheduling operation can also include the mark of scheduler adapter Know, then the format of policy library 1024 is as shown in table 2.
Table 2
Wherein, the mark of the scheduler in the embodiment of the present invention can be the address of scheduler, can also be used for for other Unique information for indicating scheduler, the present invention is not especially limit this.Similarly, the scheduler in the embodiment of the present invention The mark of adapter can be the address of scheduler adapter, can also be other for uniquely indicating the letter of scheduler adapter Breath, the present invention is not especially limit this.
Optionally, the first scheduler 41 in Fig. 4 is node scheduling device, and the second scheduler 42 is process scheduler, accordingly , the first scheduler adapter 401 is node scheduling device adapter, and the second scheduler adapter 403 is process scheduler adaptation Device;Alternatively, the first scheduler 41 is process scheduler, the second scheduler 42 is node scheduling device, correspondingly, the first scheduler is suitable Orchestration 401 is process scheduler adapter, and the second scheduler adapter 403 is node scheduling device adapter.
Fig. 5 is a kind of flow diagram of dispatching method provided in an embodiment of the present invention, which can apply In scheduling system shown in Fig. 4.
Referring to Fig. 5, which includes:
It includes that first scheduler is completed that the first scheduler adapter of S500, the first scheduler into dispatching device, which is sent, The mark that event and object corresponding with the event that occurred has occurred event notice.
The scheduling engine of S501, the first scheduler adapter into dispatching device sends event notice.
S502, scheduling engine obtain pending scheduling operation corresponding with the event that occurred respectively and from policy library The mark of two schedulers.
Policy library is stored with the corresponding pass between the event of generation, pending scheduling operation and the mark of the second scheduler System, pending scheduling operation are corresponding with the second scheduler adapter.
The the second scheduler adapter of S503, scheduling engine into dispatching device sends pending scheduling operation, object The mark of mark and the second scheduler.
S504, the second scheduler adapter carry the mark of pending scheduling operation and object to the second scheduler dispatches Notification message, to notify the second scheduler to complete pending scheduling operation according to the mark of object.
First scheduler of first scheduler after completing generation event, into dispatching device in the embodiment of the present invention Adapter has occurred event and the mark of the corresponding object of event has occurred with this, adjusts convenient for first in dispatching device Degree device adapter is communicated with the scheduling engine in the dispatching device, triggers and the corresponding pending scheduling operation of event has occurred with this Completion, i.e., execution S500.
Optionally, if having occurred, event is corresponding with a certain node, and being identified as the corresponding object of event has occurred with this The mark of the node;If having occurred, event is corresponding with a certain process, is identified as this with what this had occurred the corresponding object of event The mark of process.
Illustratively, if the first scheduler is node scheduling device, the node scheduling device is after newly-built node A, to node tune Spending device adapter and sending includes the event notice for creating the mark A of node and newly-built node.
First scheduler adapter can forward the event to notify after receiving event notice to scheduling engine, convenient for adjusting Degree engine from obtained in policy library respectively with the corresponding pending scheduling operation of the event of generation and second in event notice The mark of scheduler, i.e. execution S501 and S502.
Be stored with policy library in the scheduling engine of the embodiment of the present invention, the format of the policy library can with reference to above-mentioned table 1 or Table 2, is herein no longer described in detail this.In conjunction with foregoing description it is found that be stored in policy library event, scheduling operation and The feature of the equipment of scheduling operation is completed, event has occurred as at least one event in policy library in the embodiment of the present invention One of them.
From the description above it is found that the scheduling operation in policy library is the scheduling that corresponding event triggers, due to process There are two-way linkages for grade scheduling and node level scheduling, therefore, corresponding with the event if a certain event is corresponding with node resource Scheduling operation is corresponding with process resource.Correspondingly, if a certain event is corresponding with process resource, scheduling behaviour corresponding with the event Make corresponding with node resource.Therefore, scheduling operation corresponding with the event of generation that the first scheduler is completed and the second scheduler Adapter is corresponding.In this way, even if the feature for completing the equipment of scheduling operation in policy library does not include the mark of scheduler adapter, Scheduling engine also can determine that pending scheduling operation is corresponding with the second scheduler adapter.
Scheduling engine is adapted to after the mark for getting pending scheduling operation and the second scheduler to the second scheduler Device sends the mark of pending scheduling operation, the mark of object and the second scheduler, triggers convenient for the second scheduler adapter Second scheduler completes pending scheduling operation according to the mark of object, i.e. execution S503 and S504.
Due to including being stored with the event of generation, pending scheduling operation and second in the scheduling engine of the embodiment of the present invention The policy library of corresponding relationship between the mark of scheduler, and pending scheduling operation is corresponding with the second scheduler adapter, because This, scheduling engine can get according to the policy library and send out with this after receiving the event for carrying the event that occurred notice The corresponding pending scheduling operation of part of making trouble, and the second scheduler adapter is notified to trigger the second scheduler and complete pending scheduling Operation realizes the two-way linkage of scheduling of resource, and without manual operation, the automation for meeting scheduling of resource under cloud scene is needed It asks.
Further, before the first scheduler sends event notice to the first scheduler adapter, the first scheduler is suitable Orchestration and the second scheduler adapter are also communicated with scheduling engine respectively, are convenient for scheduling engine generation strategy library, to realize resource The two-way linkage of scheduling.
Specifically, in conjunction with Fig. 5, as shown in fig. 6, before S500, dispatching method provided in an embodiment of the present invention further include:
S505, the first scheduler adapter obtain the first registration information, and send first registration information to scheduling engine.
First registration information include the first executable event, the first executable scheduling operation and the first equipment feature it Between corresponding relationship, the first executable event is the pending event of the first scheduler, and the first executable event triggering first Equipment completes the first executable scheduling operation, and the feature of first equipment includes the mark of the second scheduler.
S506, the second scheduler adapter obtain the second registration information, and send the second registration information to scheduling engine.
Second registration information include the second executable event, the second executable scheduling operation and the second equipment feature it Between corresponding relationship, the second executable event is the pending event of the second scheduler, and the second executable event triggering second Equipment completes the second executable scheduling operation, and the feature of the second equipment includes the mark of the first scheduler.
S507, scheduling engine store the first registration information and the second registration information, with generation strategy library.
Wherein, S505 can be first carried out in the embodiment of the present invention, executes S506 afterwards, can also first carry out S506, it is rear to execute S507 may also be performed simultaneously S505 and S506, and the present invention is not especially limit this.
As can be seen that the first scheduler adapter dynamic registration and the first scheduler in the embodiment of the present invention are achievable The scheduling of resource, the second scheduler adapter can also dynamic registration and the achievable resource of the second scheduler scheduling, therefore, this Dispatching device in inventive embodiments is coupled with the first scheduler or without technology between the second scheduler, only needs interface tune With the dynamic dispatching that resource can be realized.
Dispatching method provided in an embodiment of the present invention is understood in order to more convenient, and the embodiment of the present invention in MongoDB (to divide Cloth document storing data library) in realize scheduling of resource for be illustrated.The embodiment of the present invention adds in existing MongoDB Add the dispatching device including node scheduling device adapter, process scheduler adapter and scheduling engine.
Fig. 7 is the structural schematic diagram of the MongoDB after extending in the embodiment of the present invention.Nova in Fig. 7 is private clound Virtual machine (English: Virtual Machine, abbreviation: VM) scheduler, is connected at least one VM, Nova is corresponding originally under scene Node scheduling device in inventive embodiments, each VM correspond to the node resource in the embodiment of the present invention;OpsManager is The operation and maintenance tools of MongoDB, can monitor with O&M MongoDB, and dispatch the process of configuration MongoDB, the corresponding present invention is implemented Process scheduler in example;Shard is the back end in MongoDB;Mongo Config is the metadata clothes of MongoDB The data distribution view of management back end, the distributed intelligence of back end are responsible in business;Master is the host node of MongoDB, It is responsible for the data of read-write back end, but does not manage the location information of back end, needs to read number by Mongo Config According to the position of node.Shard, Mongo Config and Master correspond to the process resource in the embodiment of the present invention.
In conjunction with Fig. 7, as shown in figure 8, the second scheduler is OpsManager, scheduling engine if the first scheduler is Nova Policy library in scheduling operation corresponding with newly-built VM be deployment Shard2 process, and the data of synchronous Shard2 process are given Mongo Config, then the dispatching method process suitable for the scene are as follows:
S800, node scheduling device adapter obtain the first registration information, and send first registration information to scheduling engine.
First registration information include the first executable event, the first executable scheduling operation and the first equipment feature it Between corresponding relationship, the first executable event is the pending event of Nova, and to trigger the first equipment complete for the first executable event At the first executable scheduling operation, the feature of the first equipment includes the mark of OpsManager.
Optionally, the feature of the first equipment can also include the mark of the second scheduler adapter, wherein the second scheduler The mark of adapter can be include attendant application programming interface in the second scheduler adapter (English: Application Programming Interface, referred to as: API) Internet protocol address (English: Internet Protocol Address, referred to as: the IP) uniform resource locator (English: Uniform Resource Locator, letter of address and port Claim: URL).
S801, process scheduler adapter obtain the second registration information, and send the second registration information to scheduling engine.
Second registration information include the second executable event, the second executable scheduling operation and the second equipment feature it Between corresponding relationship, the second executable event is the pending event of OpsManager, and the second executable event triggering second Equipment completes the second executable scheduling operation, and the feature of the second equipment includes the mark of Nova.
Optionally, the feature of the second equipment can also include the mark of the first scheduler adapter, wherein the first scheduler The mark of adapter can be the URL for including the IP address and port that API is serviced in the first scheduler adapter.
S802, scheduling engine store the first registration information and the second registration information, with generation strategy library.
S803, Nova create VM 1.
S804, Nova send event notice to node scheduling device adapter, to notify node scheduling device adapter Nova has created VM 1.
Wherein, event notice includes newly-built this event of VM and the mark of newly-built VM.
S805, node scheduling device adapter send received event notice to scheduling engine.
S806, scheduling engine obtain scheduling operation corresponding with newly-built VM from policy library, which is deployment Shard2 process, and the data of synchronous Shard2 process give Mongo Config.
S807, scheduling engine notice process scheduler adapter triggering OpsManager disposed on VM 1 Shard2 into Journey, and the data of synchronous Shard2 process give Mongo Config, the i.e. scheduling of triggering process level.
S808, process scheduler adapter notice OpsManager dispose Shard2 process on VM 1, and synchronous The data of Shard2 process give Mongo Config, i.e. executive process grade is dispatched.
S809, OpsManager dispose Shard2 process on VM 1, and the data of synchronous Shard2 process are to Mongo Config。
Wherein, the method that OpsManager disposes Shard2 process on VM 1 can be with reference in the prior art in a certain section The method of deployment process on point, the present invention is not especially limit this.
As can be seen that using dispatching method provided in an embodiment of the present invention, Nova is successfully triggered after newly-built VM OpsManager disposes Shard2 process on newly-built NM, and the data of synchronous Shard2 process give Mongo Config, real Show from node level and has been dispatched to the single-way linkage that process level is dispatched.
In conjunction with Fig. 7, as shown in figure 9, the second scheduler is Nova, scheduling engine if the first scheduler is OpsManager Policy library in scheduling operation corresponding with Shard2 process failure be to restart VM, then the dispatching method stream suitable for the scene Journey are as follows:
S900, node scheduling device adapter obtain the first registration information, and send first registration information to scheduling engine.
S901, process scheduler adapter obtain the second registration information, and send the second registration information to scheduling engine.
S902, scheduling engine store the first registration information and the second registration information, with generation strategy library.
S900-S902 in the embodiment of the present invention is identical as above-mentioned S800-S802, is no longer described in detail herein.
S903, OpsManager determine that the Shard2 process in VM 1 breaks down.
Specifically, OpsManager, when detecting that the Shard2 process in VM 1 breaks down, trial restarts this Shard2 process, if during restarting the Shard2 process, which still breaks down, then the OpsManager Determine that the Shard2 process breaks down.
S904, OpsManager send event notice to process scheduler adapter, to notify process scheduler to be adapted to Shard2 process in device VM1 breaks down.
Wherein, event notice include VM 1 in Shard process break down this event, the mark of VM 1 and The mark of Shard2 process.
S905: process level scheduler adapter sends received event notice to scheduling engine.
S906, scheduling engine obtain scheduling operation corresponding with the failure of Shard process, scheduling behaviour from policy library As restarting VM.
S907, scheduling engine notice node scheduling device adapter triggering Nova restart VM 1, i.e. triggering node level scheduling.
S908, node scheduling device adapter notice Nova restart VM 1, i.e. execution node level scheduling.
S909, Nova restart VM 1.
As can be seen that using dispatching method provided in an embodiment of the present invention, OpsManager is determining that Shard2 process goes out It after existing failure, successfully triggers Nova and restarts VM 1, realize from process level and be dispatched to the single-way linkage that node level is dispatched.
It is dispatched in conclusion can be realized process level scheduling using dispatching method provided in an embodiment of the present invention with node level Two-way linkage, and without manual operation, meet the automation demanding of scheduling of resource under cloud scene.
The embodiment of the present invention provides a kind of dispatching device, which is used to execute the first tune in the above dispatching method Step performed by degree device adapter, the second scheduler adapter and scheduling engine.
As shown in Figure 10, the dispatching device include: the first scheduler adapter 100, the second scheduler adapter 101 and Scheduling engine 102.First scheduler adapter 100 and the second scheduler adapter 101 are connect with scheduling engine 102 respectively.The One scheduler adapter 100 is for supporting dispatching device to execute the S501 in Fig. 6 and S505;Second scheduler adapter is for branch It holds dispatching device and executes S504 and S506 in Fig. 6;Scheduling engine 102 for support dispatching device execute the S502 in Fig. 6, S503 and S507.
The embodiment of the present invention provides a kind of dispatching device, which includes the first scheduler adapter, the second scheduling Device adapter and scheduling engine, and include being stored with the event of generation, pending scheduling operation and the second tune in scheduling engine The policy library for spending the corresponding relationship between the mark of device, due to scheduling operation pending in policy library and the second scheduler adapter It is corresponding, therefore, scheduling engine after receiving the event for carrying the event that occurred notice, can be got according to the policy library with The corresponding pending scheduling operation of event has occurred in this, and the second scheduler adapter is notified to trigger the second scheduler and complete wait hold Row scheduling operation, realizes the two-way linkage of scheduling of resource, and without manual operation, meet scheduling of resource under cloud scene from Dynamicization demand.
Through the above description of the embodiments, it is apparent to those skilled in the art that, for description It is convenienct and succinct, only the example of the division of the above functional modules, in practical application, can according to need and will be upper It states function distribution to be completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, to complete All or part of function described above.The specific work process of the system, apparatus, and unit of foregoing description, before can referring to The corresponding process in embodiment of the method is stated, details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with It realizes by another way.
For example, the apparatus embodiments described above are merely exemplary, for example, the division of module or unit, only For a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine Or it is desirably integrated into another system.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.
Based on this understanding, all or part of the technical solution of the embodiment of the present invention can be in the form of software products It embodies.The computer software product is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) or processor execute described in each embodiment of the present invention The all or part of the steps of method.Storage medium is for example are as follows: general serial bus USB (English: Universal Serial Bus flash disk, USB flash disk), mobile hard disk, ROM, RAM, various Jie that can store program code such as magnetic or disk Matter.
Obviously, those skilled in the art can carry out various modification and variations without departing from this hair to the embodiment of the present invention Bright range.In this way, if these modifications and variations of the embodiment of the present invention belong within the scope of the claims in the present invention, then The embodiment of the present invention is also intended to include these modifications and variations.

Claims (8)

1. a kind of dispatching device, which is characterized in that the dispatching device includes the first scheduler adapter, the second scheduler adaptation Device and scheduling engine, the first scheduler adapter and the second scheduler adapter connect with the scheduling engine respectively It connects, and the first scheduler adapter and the second scheduler adapter are different types of scheduler adapter;Wherein,
The first scheduler adapter, the event for receiving the first scheduler dispatches notifies, and sends out to the scheduling engine The event is sent to notify, the event notice includes the event of generation and occurred with described that first scheduler is completed The mark of the corresponding object of event;
The scheduling engine, the event notice sent for receiving the first scheduler adapter, and from policy library Obtain respectively with the mark that the corresponding pending scheduling operation of event and the second scheduler has occurred, then to the second scheduling Device adapter sends the mark of the pending scheduling operation, the mark of the object and second scheduler, the plan Slightly inventory contains described occurred between the mark three of event, the pending scheduling operation and second scheduler Corresponding relationship, the pending scheduling operation are corresponding with the second scheduler adapter;
The second scheduler adapter, for receiving the pending scheduling operation that the scheduling engine sends, described right The mark of the mark of elephant and second scheduler, and according to the mark of second scheduler, the second scheduler of Xiang Suoshu Send the notification message for carrying the mark of the pending scheduling operation and the object, with notify second scheduler according to The mark of the object completes the pending scheduling operation.
2. dispatching device according to claim 1, which is characterized in that
The first scheduler adapter is node scheduling device adapter, and first scheduler is node scheduling device, described the Two scheduler adapters are process scheduler adapter, and second scheduler is process scheduler;
Alternatively,
The first scheduler adapter is process scheduler adapter, and first scheduler is process scheduler, described the Two scheduler adapters are node scheduling device adapter, and second scheduler is node scheduling device.
3. dispatching device according to claim 1 or 2, which is characterized in that
The first scheduler adapter is also used to obtain the first registration information, and sends described first to the scheduling engine Registration information, first registration information include the first executable event, the first executable scheduling operation and the first equipment Corresponding relationship between feature, first executable event event pending for first scheduler, and described first Executable event triggers first equipment and completes the first executable scheduling operation, and the feature of first equipment includes institute State the mark of the second scheduler;
The second scheduler adapter is also used to obtain the second registration information, and sends described second to the scheduling engine Registration information, second registration information include the second executable event, the second executable scheduling operation and the second equipment Corresponding relationship between feature, second executable event event pending for second scheduler, and described second Executable event triggers second equipment and completes the second executable scheduling operation, and the feature of second equipment includes institute State the mark of the first scheduler;
The scheduling engine, first registration information sent for receiving and storing the first scheduler adapter, with And second registration information that the second scheduler adapter is sent is received and stored, to generate the policy library.
4. dispatching device according to claim 3, which is characterized in that
The feature of first equipment further includes the mark of the second scheduler adapter, and the feature of second equipment is also wrapped Include the mark of the first scheduler adapter.
5. a kind of dispatching method, which is characterized in that applied to the scheduling dress as described in any one of the claims 1-4 It sets, the dispatching method includes:
First scheduler adapter receives the event notice of the first scheduler dispatches, and sends the event to scheduling engine and lead to Know, event notice include the event of generation that first scheduler is completed and with described that event has occurred is corresponding right The mark of elephant;
The scheduling engine is obtained from policy library has occurred the corresponding pending scheduling operation of event and with described respectively The mark of two schedulers, the policy library, which is stored with, described has occurred event, the pending scheduling operation and described second Corresponding relationship between the mark three of scheduler, the pending scheduling operation are corresponding with the second scheduler adapter;
The scheduling engine to the second scheduler adapter send the pending scheduling operation, the object mark with And the mark of second scheduler;
The second scheduler adapter is according to the mark of second scheduler, described in the second scheduler dispatches of Xiang Suoshu carry The notification message of the mark of pending scheduling operation and the object, to notify second scheduler according to the mark of the object Know and completes the pending scheduling operation.
6. dispatching method according to claim 5, which is characterized in that the first scheduler adapter receives the first scheduling Before the event notice that device is sent, the dispatching method further include:
The first scheduling adapter obtains the first registration information, and sends first registration information to the scheduling engine, First registration information includes between the feature of the first executable event, the first executable scheduling operation and the first equipment Corresponding relationship, first executable event event pending for first scheduler, and first executable event It triggers first equipment and completes the first executable scheduling operation, the feature of first equipment includes second scheduling The mark of device;
The second scheduler adapter obtains the second registration information, and sends the second registration letter to the scheduling engine Breath, second registration information include the second executable event, the second executable scheduling operation and the second equipment feature it Between corresponding relationship, second executable event is the pending event of second scheduler, and described second is executable Event triggers second equipment and completes the second executable scheduling operation, and the feature of second equipment includes described first The mark of scheduler;
The scheduling engine stores first registration information and second registration information, to generate the policy library.
7. dispatching method according to claim 6, which is characterized in that
The feature of first equipment further includes the mark of the second scheduler adapter, and the feature of second equipment is also wrapped Include the mark of the first scheduler adapter.
8. the dispatching method according to any one of claim 5-7, which is characterized in that
The first scheduler adapter is node scheduling device adapter, and first scheduler is node scheduling device, described the Two scheduler adapters are process scheduler adapter, and second scheduler is process scheduler;
Alternatively,
The first scheduler adapter is process scheduler adapter, and first scheduler is process scheduler, described the Two scheduler adapters are node scheduling device adapter, and second scheduler is node scheduling device.
CN201610879321.2A 2016-09-30 2016-09-30 A kind of dispatching method and device Active CN106502787B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610879321.2A CN106502787B (en) 2016-09-30 2016-09-30 A kind of dispatching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610879321.2A CN106502787B (en) 2016-09-30 2016-09-30 A kind of dispatching method and device

Publications (2)

Publication Number Publication Date
CN106502787A CN106502787A (en) 2017-03-15
CN106502787B true CN106502787B (en) 2019-11-26

Family

ID=58293513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610879321.2A Active CN106502787B (en) 2016-09-30 2016-09-30 A kind of dispatching method and device

Country Status (1)

Country Link
CN (1) CN106502787B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112615912B (en) * 2020-12-11 2022-07-12 中国建设银行股份有限公司 Node scheduling processing method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047218A (en) * 2008-06-02 2011-05-04 微软公司 Scheduler instances in a process
CN102387173A (en) * 2010-09-01 2012-03-21 ***通信集团公司 MapReduce system and method and device for scheduling tasks thereof
CN102473143A (en) * 2009-07-23 2012-05-23 日本电气株式会社 Event processing system and method, distribution control device and method, and program storage medium
CN105550025A (en) * 2015-12-08 2016-05-04 北京航空航天大学 Distributed IaaS (Infrastructure as a Service) scheduling method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6191361B2 (en) * 2013-09-25 2017-09-06 富士通株式会社 Information processing system, information processing system control method, and control program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047218A (en) * 2008-06-02 2011-05-04 微软公司 Scheduler instances in a process
CN102473143A (en) * 2009-07-23 2012-05-23 日本电气株式会社 Event processing system and method, distribution control device and method, and program storage medium
CN102387173A (en) * 2010-09-01 2012-03-21 ***通信集团公司 MapReduce system and method and device for scheduling tasks thereof
CN105550025A (en) * 2015-12-08 2016-05-04 北京航空航天大学 Distributed IaaS (Infrastructure as a Service) scheduling method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"云计算环境下海量分布式数据处理协同机制的研究";戴炳荣 等;《计算机应用与软件》;20130131;第30卷(第1期);第107-110页 *

Also Published As

Publication number Publication date
CN106502787A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
US11509729B2 (en) Field service management mobile offline synchronization
US20230385051A1 (en) Cloud services release orchestration
US10042636B1 (en) End-to end project management platform with artificial intelligence integration
US20190377604A1 (en) Scalable function as a service platform
US10762234B2 (en) Data processing in a hybrid cluster environment
CN110658794B (en) Manufacturing execution system
US11481239B2 (en) Apparatus and methods to incorporate external system to approve deployment provisioning
US9003406B1 (en) Environment-driven application deployment in a virtual infrastructure
CN105593817B (en) Method and system for flexible node composition on local or distributed computer system
CN107689882A (en) The method and apparatus of service deployment in a kind of virtualization network
CN110083455B (en) Graph calculation processing method, graph calculation processing device, graph calculation processing medium and electronic equipment
CN109117252B (en) Method and system for task processing based on container and container cluster management system
US10353752B2 (en) Methods and apparatus for event-based extensibility of system logic
CN113366802B (en) State controller operating in kubrennetes system and method of operating the same
WO2016201160A1 (en) Computing resource deployment system
EP3837604A1 (en) In situ triggered function as a service within a service mesh
CN108885564A (en) Resource in network virtualization scene places control
CN110196729A (en) Application program update method, equipment and device and storage medium
CN115280325A (en) Parameter sharing in federated learning
CN111078516A (en) Distributed performance test method and device and electronic equipment
US11153224B2 (en) Method of providing cloud computing infrastructure
WO2016201161A1 (en) Computing resource management system
WO2022184495A1 (en) Serverless runtime container allocation
CN106502787B (en) A kind of dispatching method and device
CN115361382B (en) Data processing method, device, equipment and storage medium based on data group

Legal Events

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