CN108293041A - A kind of distribution method of resource, device and system - Google Patents

A kind of distribution method of resource, device and system Download PDF

Info

Publication number
CN108293041A
CN108293041A CN201580084802.8A CN201580084802A CN108293041A CN 108293041 A CN108293041 A CN 108293041A CN 201580084802 A CN201580084802 A CN 201580084802A CN 108293041 A CN108293041 A CN 108293041A
Authority
CN
China
Prior art keywords
resource
container
application controller
manager
pool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201580084802.8A
Other languages
Chinese (zh)
Other versions
CN108293041B (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 Cloud Computing 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
Publication of CN108293041A publication Critical patent/CN108293041A/en
Application granted granted Critical
Publication of CN108293041B publication Critical patent/CN108293041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Abstract

An embodiment of the present invention provides a kind of resource allocation methods, device and system, for being allocated resources.This method includes:Application controller receives the resource allocation request from client, the resource requirement information of the application run in client is carried in the resource allocation request, wherein, the application controller is for managing resource pool, include at least one container having been turned in resource pool, the container in the resource pool to explorer application and is started in advance from the application controller;Application controller selects idle resource container to distribute to client according to the resource requirement information of the application from resource pool.According to this method, after application controller receives the resource allocation request of application, the timely distribution of resource container resource may be implemented, avoid the stand-by period of resource container startup, and by the reuse to resource container in resource pool, the resource consumption repeatedly opened and closed to resource container is avoided.

Description

A kind of distribution method of resource, device and system Technical field
The present embodiments relate to computer field more particularly to a kind of resource allocation methods.
Background technique
Since cloud computing develops, the scale of cluster constantly expands, and cluster type is also increasing.Such as common distributed computing Hadoop cluster towards multiple programming technical assignment.From the point of view of industry is using the variation tendency of distributed system and the long term growth of Hadoop frame, job trace device (Job Tracker)/task tracker (Task Tracker) mechanism in first version MRv1 of MapReduce needs large-scale adjustment to repair it in scalability, memory consumption, threading model, the defect in reliability and performance.
Another resource coordination person (Yet Another Resource Negotiator, it yarn) is a kind of new Hadoop resource manager, it is a universal resource management system, unified resource management and scheduling can be provided for upper layer application, it be introduced as cluster utilization rate, resource unified management and in terms of bring big advantages.Yarn is initially the obvious deficiency in order to repair MRv1, and is promoted to scalability, reliability and cluster utilization rate.Yarn realizes that the mode of these demands is, two major functions (resource management and job scheduling/monitoring) of Job Tracker are divided into two independent service routines, one is global resource manager (Resource Manager, RM) and for each operation job trace device (Application Master, AM).
Each operation enables an independent AM in Yarn, solves Single Point of Faliure and extension bottleneck problem in MRv1.But this mode will introduce a new problem: Operating Ratio is larger.Each operation first has to start an AM to RM application resource, which, just can formal initiating task again to RM application resource and after starting resource container.So Yarn operation can generate longer operation delay, this is unfavorable for running small operation, and because to be one AM of each job request, needs more computing resources.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of distribution method of resource, device and system, with Reduce the waiting time of operation.
First aspect, this application provides a kind of distribution methods of resource container in distributed system, distributed system includes resource manager and node manager, the node resource of resource manager managing distributing type system, node manager is based on node resource and starts resource container, resource container is used to execute the task of application, this method comprises: resource manager starts application controller when meeting trigger timing, and configure the initial specification of the resource pool of the application controller management, the initial specification of the resource pool is used to indicate the number and specification that the application controller applies for resource container to resource manager for the first time, after the first resource that resource manager receives the resource pool that the application controller is sent according to the initial specification of resource pool is requested, it is requested according to the first resource of the resource pool, initial resource container is distributed for the resource pool, and to this Application controller sends the first resource assignment messages of the resource pool, the information of the node where the initial resource container distributed in first resource assignment messages comprising the resource pool that resource manager is application controller management.
Resource manager actively starts application controller, and configure the initial specification of the resource pool of application controller management, to make application controller apply for the resource container of certain amount in advance to resource manager according to the initial specification of resource pool, to the container that pre-cooling application is arrived, reduce the time that subsequent applications operation waits resource container starting.
With reference to first aspect, in a first possible implementation of that first aspect, it includes: that resource manager receives the request for pre-actuating application controller or the request for being pre-configured with resource pool that resource manager, which starts application controller when meeting trigger timing, or in system initialization, start the application controller.
The starting time of application controller can be based on user demand there are many mode, started by administrator by instruction, can also independently be started by system configuration, in system initialization by resource manager.
With reference to first aspect or the possible implementation of first aspect any of the above, in a second possible implementation of that first aspect, the initial specification that resource manager configures the resource pool of application controller management includes: expected resource requirement information of the resource manager according to pre-set application, configures the initial specification of the resource pool of application controller management;Alternatively, use information of the resource manager according to the node resource for the distributed system being collected into, configures the initial specification of the resource pool of application controller management.For example, resource manager can configure the initial specification of biggish resource pool when there is the sufficient node resource being not used by;When the node resource being not used by is less, resource manager can configure the initial specification of lesser resource pool.
In addition, the initial specification of resource pool can be carried in the enabled instruction of application controller by administrator if application controller is started by the instruction of administrator, and in starting, this is answered by resource manager When with controller, application controller is configured.
Second aspect, this application provides a kind of computer-readable mediums, including computer executed instructions, and when the processor of computer executes the computer executed instructions, which executes the method in first aspect or any possible implementation of first aspect.
The third aspect, this application provides a kind of calculating equipment, comprising: processor, memory, bus and communication interface;The memory is executed instruction for storing, the processor is connect with the memory by the bus, when calculating equipment operation, the processor execute memory storage this execute instruction so that the calculating equipment executes the method in first aspect or any possible implementation of first aspect.
Fourth aspect, this application provides a kind of distribution methods of resource container in distributed system, distributed system includes resource manager and node manager, the resource manager is used to manage the node resource of the distributed system, the node manager is used to start resource container based on the node resource, the resource container is used to execute the task of application, the resource manager starts application controller when meeting trigger timing, configure the initial specification of the resource pool of the application controller management, and initial resource container is distributed according to the resource pool that the initial specification of the resource pool is the application controller management, the initial resource container of the resource pool has been turned on;
This method comprises: application controller receives the resource allocation request from client, the application request resource container that the resource allocation request is used for run in the client, the resource requirement information of the application is carried in resource allocation request, and according to the resource requirement information of the application, idle resource container is selected to distribute to the client from the resource pool.
In conjunction with fourth aspect, in fourth aspect in the first possible implementation, the application controller receives before the resource allocation request from the client, this method further include: the application controller sends first resource to the resource manager according to the initial specification of the resource pool and requests, the resource quantity determined according to the initial specification of the resource pool is carried in first resource request, obtain the first resource assignment messages of the resource pool of resource manager transmission, the information of node where the initial resource container distributed in the first resource assignment messages comprising the resource manager for the resource pool, and starting request is sent to the node manager, the node manager is requested to start the initial resource container of the resource pool.
Since the resource container in resource pool is from application controller in advance to resource manager application, when application controller receives the resource allocation request from client, can the resource container having been turned on timely be distributed for client, so as to avoid in the prior art, after receiving application job, start the waiting time of AM and resource container.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in second of fourth aspect possible implementation, it include the mark of the client in the resource allocation request, the application controller in the resource pool from selecting after idle resource container distributes to the client, this method further include: the application controller each resource container into the resource container for distribute to the client sends instruction message, the mark of the client is carried in the instruction message, which, which is used to indicate, distributes to the client for each resource container.
By the mark for carrying client in instruction message, corresponding resource container is allocated to the client by instruction, to make the corresponding resource container send registration message to client, so that the task of application can be distributed the resource container for being given to its registration by client.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in fourth aspect in the third possible implementation, this method further include: the application controller determines the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, then Secondary resource request is sent to the resource manager, and receive the Secondary resource assignment messages of the resource pool of resource manager, according to the Secondary resource assignment messages of the resource pool, starting request is sent to node manager, requesting node manager starting is the newly-increased resource container of resource pool distribution.
More specifically, it can be after the resource container in resource pool be distributed to the client by application controller, determine the number of the resource container of remaining free time in the resource pool, or the number of the resource container of remaining free time in the resource pool is periodically determined by application controller, when the number of the resource container of remaining free time is less than preset first threshold, show that the resource container of resource pool may not be able to meet subsequent batch operation, then by applying for resource container again to resource manager, with the resource container in supplemental resources pond.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in the 4th kind of possible implementation of fourth aspect, this method further include: the application controller determines the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, then at least one resource container into idle resource container sends resource release message, which is used to discharge the resource of at least one resource container occupancy.
More specifically, it can be after the resource container dispensed have executed the task of client, determine the number of the resource container of remaining free time in the resource pool, or the number of the resource container of remaining free time in the resource pool is periodically determined by application controller, when the number of the resource container of remaining free time is greater than preset second threshold, then at least one resource container into idle resource container sends resource release message.To discharge the resource of resource pool occupancy, global resource rational utilization ensure that.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in the 5th kind of possible implementation of fourth aspect, the application controller safeguards the status information of each resource container in the resource pool, which indicates whether corresponding resource container is idle;The application controller includes: status information of the application controller according to resource container each in the resource pool from selecting idle resource container to distribute to the client in the resource pool, resource container idle in the resource pool is selected, and resource container idle in the selected resource pool is distributed into the client.
Wherein, if resource container is currently assigned away other tasks that execute, the state of the resource container be it is not idle, if resource container is currently without being assigned away, the state of the resource container is idle.Specifically, application controller can safeguard a status information table, maintenance has the status information of each resource container in resource pool in status information table, it to enable application controller quickly to determine current idling-resource container, and is that client distributes container according to idle resource container and resource allocation request.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in the 6th kind of possible implementation of fourth aspect, the application controller in the resource pool from selecting after idle resource container distributes to the client, this method further include: the application controller sets not idle for the state of each of the resource container for distributing to client resource container.
In conjunction with fourth aspect or the possible implementation of fourth aspect any of the above, in the 7th kind of possible implementation of fourth aspect, after the application controller sets not idle for the state of each of the resource container for distributing to client resource container, this method further include: the application controller receives the state update message of each resource container in the resource container for distribute to the client, which is used to indicate the completing client distribution of the task;The application controller sets idle for the state of each resource container in the resource container for distributing to the client.
Variation of the application controller according to the state of resource container, the dynamic status information for updating self maintained, to can accurately determine the idling-resource container in resource pool when ensure that resource allocation request.
It also include user right information in the resource allocation request in the 7th kind of possible implementation of fourth aspect in conjunction with fourth aspect or the possible implementation of fourth aspect any of the above;This method further include: the application controller verifies the user right information according to preset user right library, which includes the user right information.
Wherein, user right library includes the user right information of different user.If not including the user right information of the client in user right library, refuse or be not responding to the resource allocation request of client;Such as The step of including the user right information of the client 102 in fruit user right library, then executing following resource distribution.
5th aspect, this application provides a kind of computer-readable mediums, including computer executed instructions, and when the processor of computer executes the computer executed instructions, which executes the method in fourth aspect or any possible implementation of fourth aspect.
6th aspect, this application provides a kind of calculating equipment, comprising: processor, memory, bus and communication interface;The memory is executed instruction for storing, the processor is connect with the memory by the bus, when calculating equipment operation, the processor execute memory storage this execute instruction so that the calculating equipment executes the method in fourth aspect or any possible implementation of fourth aspect.
7th aspect, this application provides a kind of distributors of resource container in distributed system, distributed system includes the device and node manager, the device is used to manage the node resource of the distributed system, the node manager is used to start resource container based on the node resource, which is used to execute the task of application, which includes: start unit, for starting application controller when meeting trigger timing, and configure the initial specification of the resource pool of the application controller management;Receiving unit, the first resource for receiving the resource pool that the application controller is sent according to the initial specification of the resource pool are requested;Allocation unit distributes initial resource container for the resource pool for requesting according to the first resource;Transmission unit, for sending the first resource assignment messages of the resource pool to the application controller, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the allocation unit for the resource pool.
The device actively starts application controller, and configure the initial specification of the resource pool of application controller management, to make application controller apply for the resource container of certain amount in advance to the device according to the initial specification of resource pool, to the container that pre-cooling application is arrived, reduce the time that subsequent applications operation waits resource container starting.
In conjunction with the 7th aspect, the 7th aspect the first possible implementation in, the start unit is for starting application controller when meeting trigger timing, it include: the start unit for receiving the request for pre-actuating application controller or the request for being pre-configured with resource pool, or in system initialization, start the application controller.
The starting time of application controller can be based on user demand there are many mode, started by administrator by instruction, can also independently be started by system configuration, in system initialization by start unit.
In conjunction with the 7th aspect or the 7th possible implementation of aspect any of the above, in the 7th second of possible implementation of aspect, which is used to configure the first of the resource pool of the application controller management Beginning specification, comprising: the start unit is used for the expected resource requirement information according to pre-set application, configures the initial specification of the resource pool of application controller management;Or the use information of the node resource according to the distributed system being collected into, configure the initial specification of the resource pool of application controller management.For example, start unit can configure the initial specification of biggish resource pool when there is the sufficient node resource being not used by;When the node resource being not used by is less, start unit can configure the initial specification of lesser resource pool.
In addition, the initial specification of resource pool can be carried in the enabled instruction of application controller by administrator, and be configured when starting the application controller to application controller by start unit if application controller is started by the instruction of administrator.
Eighth aspect, this application provides a kind of distributors of resource container in distributed system, distributed system includes resource manager and node manager, the resource manager is used to manage the node resource of the distributed system, the node manager is used to start resource container based on the node resource, the resource container is used to execute the task of application, the resource manager starts the device when meeting trigger timing, configure the initial specification of the resource pool of the device management, and initial resource container is distributed according to the resource pool that the initial specification of the resource pool is the device management, the initial resource container has been turned on;
The device includes: receiving unit, and for receiving the resource allocation request from client, which is used to be the application request resource container run in the client, and the resource requirement information of the application is carried in the resource allocation request;Allocation unit selects idle resource container to distribute to the client for the resource requirement information according to the application from the resource pool.
In conjunction with eighth aspect, in eighth aspect in the first possible implementation, the device further includes transmission unit, the receiving unit receives before the resource allocation request from the client, the transmission unit is used to send first resource request to the resource manager according to the initial specification of the resource pool, carries the resource quantity determined according to the initial specification of the resource pool in first resource request;The receiving unit is also used to receive the first resource assignment messages of resource manager transmission, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the resource manager for the resource pool;The transmission unit is also used to send starting request to the node manager, and the node manager is requested to start the initial resource container of the resource pool.
Since the resource container in resource pool is from the device in advance to resource manager application, when receiving unit receives the resource allocation request from client, allocation unit timely can distribute the resource container having been turned on for client, so as to avoid in the prior art, after receiving application job, start the waiting time of AM and resource container.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in eighth aspect second In the possible implementation of kind, the device further includes transmission unit, it include the mark of the client in the resource allocation request, the allocation unit in the resource pool from selecting after idle resource container distributes to the client, the transmission unit is used for each resource container into the resource container for distribute to the client and sends instruction message, the mark of the client is carried in the instruction message, which, which is used to indicate, distributes to the client for each resource container.
Instruction message is sent to the resource container of distribution by transmission unit, and the mark of client is carried in instruction message, corresponding resource container is allocated to the client by instruction, to make the corresponding resource container send registration message to client, so that the task of application can be distributed the resource container for being given to its registration by client.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in eighth aspect in the third possible implementation, the device further includes determination unit, and transmission unit, the determination unit is used to determine the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, the transmission unit is used to send Secondary resource request to the resource manager, receiving unit is also used to receive the Secondary resource assignment messages of the resource pool of resource manager transmission, transmission unit is also used to the Secondary resource assignment messages according to the resource pool, starting request is sent to node manager, requesting node manager starting is the newly-increased resource container of resource pool distribution.
More specifically, it can be after the resource container in resource pool be distributed to the client by allocation unit, determination unit determines the number of the resource container of remaining free time in the resource pool, or the number of the resource container of remaining free time in the resource pool is periodically determined by determination unit, when the number of the resource container of remaining free time is less than preset first threshold, show that the resource container of resource pool may not be able to meet subsequent batch operation, resource container is then applied for resource manager by transmission unit again, with the resource container in supplemental resources pond.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in the 4th kind of possible implementation of eighth aspect, the device further includes determination unit, and transmission unit, the determination unit is used to determine the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, at least one resource container that then transmission unit is used for into idle resource container sends resource release message, which is used to discharge the resource of at least one resource container occupancy.
More specifically, it can be after the resource container dispensed have executed the task of client, determination unit determines the number of the resource container of remaining free time in the resource pool, or the number of the resource container of remaining free time in the resource pool is periodically determined by determination unit, when the resource container of remaining free time Number is greater than preset second threshold, then at least one resource container by transmission unit into idle resource container sends resource release message.To discharge the resource of resource pool occupancy, global resource rational utilization ensure that.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in the 5th kind of possible implementation of eighth aspect, the allocation unit is also used to safeguard the status information of each resource container in the resource pool, which indicates whether corresponding resource container is idle;The allocation unit is used to from selecting idle resource container to distribute to the client in the resource pool include: the allocation unit for the status information according to resource container each in the resource pool, resource container idle in the resource pool is selected, and resource container idle in the selected resource pool is distributed into the client.
Wherein, if resource container is currently assigned away other tasks that execute, the state of the resource container be it is not idle, if resource container is currently without being assigned away, the state of the resource container is idle.Specifically, allocation unit can safeguard a status information table, maintenance has the status information of each resource container in resource pool in status information table, it to enable allocation unit quickly to determine current idling-resource container, and is that client distributes container according to idle resource container and resource allocation request.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in the 6th kind of possible implementation of eighth aspect, the allocation unit in the resource pool from selecting to be also used to set not idle for the state for distributing to each of the resource container of client resource container after idle resource container distributes to the client.
In conjunction with eighth aspect or the possible implementation of eighth aspect any of the above, in the 7th kind of possible implementation of eighth aspect, after the allocation unit sets not idle for the state of each of the resource container for distributing to client resource container, the receiving unit is also used to receive the state update message of each resource container in the resource container for distribute to the client, which is used to indicate the completing client distribution of the task;The allocation unit is also used to set idle for the state of each resource container in the resource container for distributing to the client according to the state updating information.
Variation of the allocation unit according to the state of resource container, the dynamic status information for updating self maintained, to can accurately determine the idling-resource container in resource pool when ensure that resource allocation request.
It also include user right information in the resource allocation request in the 7th kind of possible implementation of eighth aspect in conjunction with eighth aspect or the possible implementation of eighth aspect any of the above;The receiving unit is also used to verify the user right information according to preset user right library, which includes the user right information.
Wherein, user right library includes the user right information of different user.If in user right library not The resource allocation request of client is then refused or be not responding to user right information comprising the client;If the step of in user right library including the user right information of the client 102, executing following resource distribution.
9th aspect, this application provides a kind of distribution system of resource container in distributed system, which includes resource manager and node manager;The resource manager, for starting application controller when meeting trigger timing, configure the initial specification of the resource pool of the application controller management, and the first resource for receiving the resource pool that the application controller is sent according to the initial specification of the resource pool is requested, it is requested according to the first resource, initial resource container is distributed for the resource pool, and the first resource assignment messages of the resource pool are sent to the application controller;The application controller, for obtaining the first resource assignment messages of the resource pool of resource manager transmission, according to indicated in the first resource assignment messages of the resource pool be node where the initial resource container of resource pool distribution information, requesting node manager starting is the initial resource container of the resource pool;The node manager starts the initial resource container for the request according to the application controller.
In conjunction with the 9th aspect, the 9th aspect the first possible implementation in, it includes: the resource manager for receiving the request for pre-actuating the application controller that the resource manager, which is used to start when meeting trigger timing application controller, or when being pre-configured with the request of the resource pool, start the application controller.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th second of possible implementation of aspect, the initial specification for the resource pool that the resource manager is used to configure the application controller management includes: the resource manager for the expected resource requirement information according to the pre-set application, or the use information of the node resource according to the distributed system being collected into, configure the initial specification of the resource pool of the application controller management.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, the 9th aspect the third possible implementation in, the application controller, it is also used to receive the resource allocation request from client, the application request resource container that the resource allocation request is used for run in the client, and according to the resource requirement information of the application in the resource allocation request, idle resource container is selected to distribute to the client from the resource pool.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 4th kind of possible implementation of aspect, it include the mark of the client in the resource allocation request, the application controller in the resource pool from selecting after idle resource container distributes to the client, be also used to: into the resource container for distribute to the client, each resource container sends instruction message, carries in the instruction message The mark of the client, which, which is used to indicate, distributes to the client for each resource container.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 5th kind of possible implementation of aspect, the application controller is also used to: determining the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, then Secondary resource request is sent to the resource manager, and receive the Secondary resource assignment messages of the resource pool of resource manager, according to the Secondary resource assignment messages of the resource pool, starting request is sent to node manager, the starting of requesting node manager is the newly-increased resource container of resource pool distribution.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 6th kind of possible implementation of aspect, the application controller is also used to: determining the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, then at least one resource container into idle resource container sends resource release message, which is used to discharge the resource of at least one resource container occupancy.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 7th kind of possible implementation of aspect, the application controller is also used to safeguard the status information of each resource container in the resource pool, and the status information is for indicating whether corresponding resource container is idle;The application controller in the resource pool from selecting to be also used to: according to the status information of each resource container in the resource pool, determining resource container idle in the resource pool before idle resource container distributes to the client.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 8th kind of possible implementation of aspect, the application controller in the resource pool from selecting to be also used to: setting not idle for the state of each of the resource container for distributing to client resource container after idle resource container distributes to the client.
In conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above, in the 9th the 9th kind of possible implementation of aspect, after the application controller sets not idle for the state of each of the resource container for distributing to client resource container, it is also used to: receiving the state update message of each resource container in the resource container for distribute to the client, the state update message is used to indicate the completing client distribution of the task, and sets idle for the state of each resource container in the resource container for distributing to the client.
It also include user right information in the resource allocation request in the 9th the tenth kind of possible implementation of aspect in conjunction with the 9th aspect or the 9th possible implementation of aspect any of the above;The system further include: the application controller verifies the user right information according to preset user right library, which includes the user right information.
9th aspect is first aspect and the corresponding system embodiment of fourth aspect, first aspect or first aspect any one possible implementation, feature description in fourth aspect or fourth aspect any one possible implementation is suitable for the 9th aspect or the 9th any possible implementation of aspect, and details are not described herein.
Disclosed technical solution according to the present invention, apply for resource container in advance to resource manager in advance by application controller, and the resource container of pre-cooling request, after receiving the resource allocation request of application, the timely distribution of resource container resource may be implemented, avoid the waiting time of resource container starting, and pass through the reuse to resource container in resource pool, avoid the resource consumption repeatedly opened and closed to resource container, the resource container in resource pool is directly managed by application controller, realizes more flexible management.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, the accompanying drawings required for describing the embodiments of the present invention are briefly described below, apparently, drawings in the following description are only some embodiments of the invention, for those of ordinary skill in the art, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the exemplary networking environment block diagram of the resource allocation system of an embodiment according to the present invention;
Fig. 2 is the calculating device hardware structural schematic diagram of an embodiment according to the present invention;
Fig. 3 is the signaling diagram of the resource allocation methods of an embodiment according to the present invention;
Fig. 4 is the signaling diagram of the resource allocation methods of an embodiment according to the present invention;
Fig. 5 is the logical construction schematic diagram of the resource allocation device of an embodiment according to the present invention;
Fig. 6 is the logical construction schematic diagram of the resource allocation device of an embodiment according to the present invention;
Fig. 7 is the logical construction schematic diagram of the resource allocation device of an embodiment according to the present invention.
Specific embodiment
Below in conjunction with attached drawing, the embodiment of the embodiment of the present invention is illustrated.
Term definition:
Resource manager (Resource Manager, RM) is global resource manager, is responsible for the resource management and distribution of entire yarn system.
Resource container is that the resource in yarn is abstract, it can encapsulate the multiclass resource on some node, Such as memory, CPU, disk, network.Resource container is used to execute the task of application.
Client is the equipment for the application that operation needs to be applied resource, and the type of the application can be MapReduce, Giraph, Storm, Spark, Tez/Impala or message passing interface (Message Passing Interface, MPI) etc..
Node manager (Node Manager, NM) is the resource and task management device on each node, on the one hand, it can periodically report the operating status of the resource service condition and each resource container on this node to RM;On the other hand, it receives and processes the various requests such as starting/stopping of the resource container from application controller.
Application controller is used for RM application and manages resource pool, and operation has the resource container having been turned in resource pool, and is that client distributes resource container according to the resource allocation request of client.
Fig. 1 shows a kind of exemplary networking environment block diagram of resource allocation system 100, as shown in Figure 1, system 100 includes client 102, application controller 104, resource manager 112, and multiple nodes 106, it includes at least one resource container 110 in resource pool 114 that wherein each node 106, which includes a node manager 108 and at least one resource container 110,.
Wherein, operation needs to be applied for the application of resource in client 102, and the type of the application can be MapReduce, Giraph, Storm, Spark, Tez/Impala or MPI etc..Client 102 can be any type of calculating equipment, and the embodiment of the present invention is not limited thereto.
Resource container 110 is that the resource in node is abstract, it can encapsulate the multiclass resource on some node, such as memory, CPU, disk, network.Optionally, resource container 110 can also only encapsulate the part resource on some node, such as only encapsulation memory and CPU, the embodiment of the present invention are not limited thereto.Wherein, resource container 110 can run any kind of task.For example, MapReduce application can request a resource container 110 to start map or reduce task, and Giraph application can request a resource container 110 to run Giraph task.User can also realize a customized application type, and specific task is run by resource container 110, to realize a kind of completely new application framework.
Application controller 104 is used to manage the resource container 110 in resource pool 114, wherein, resource container in resource pool 114 is the resource container having been started up, apply and start in advance from application controller 104 to resource manager 112, when there is operation, the task of operation can be executed as early as possible, to save the starting time of resource container 114.When application controller 104 applies for resource to resource manager 112, resource manager 112 is that the resource that application controller 104 returns is indicated with resource container 110.
It should be understood that, because demand of the different applications to resource container may be different, the resource category for the resource container that i.e. different applications needs, and the quantity demand of the resource of each type is different, so different applications can correspond to different application controllers, and every a kind of application can have multiple application controllers, and the embodiment of the present invention is defined not to this, for convenience, the resource bid process that the embodiment of the present invention only applies one is described.
It should be understood that, include multiple resource containers 110 in multiple nodes 106 in resource pool 114 shown in Fig. 1, but it does not limit the resource container 110 in multiple node 106 or multiple node 106 and all belongs to resource pool 114, resource pool 114 is made of resource container 110.
Application controller 104 is for receiving the resource allocation request applied in client 102, and resource container required for the operation of the application is executed for the operation of application distribution, when executing operation, client 102 can distribute a resource container for each task in the operation of application, and the task can only use resource described in the resource container.
Resource manager 112 is a global resource manager, is responsible for the resource management and distribution of whole system, when receiving from the resource request of application controller 104, can distribute resource container according to the loading condition of whole system for application controller 104.
Wherein, client 102, application controller 104, the node manager 108 of resource manager 112 and each node 106 can be communicated by network, wherein, network can be internet, Intranet, local area network (Local Area Networks, abbreviation LANs), Wide Area Network (Wireless Local Area Networks, abbreviation WLANs), storage area network (Storage Area Networks, abbreviation SANs) etc., or the combination of the above network.
It should be understood that the purpose of Fig. 1 is only exemplary participant and their correlation of introducing system 100.Therefore, discribed system 100 is greatly simplified, and the embodiment of the present invention only carries out recapitulative explanation to it, and any restriction is not carried out to its implementation.And the client 102 in Fig. 1, application controller 104 and node 106 can be any architecture, the embodiment of the present invention is defined not to this.
Application controller 104 and/or resource manager 112 shown in FIG. 1 can calculating equipment 200 as shown in Figure 2 realize.
Fig. 2 is the logical construction schematic diagram for calculating the simplification of equipment 200, as shown in Fig. 2, calculating equipment 200 includes processor 202, internal storage location 204, input/output interface 206, communication interface 208, bus 210 and storage equipment 212.Wherein, processor 202, internal storage location 204, input/output connect Mouth 206, communication interface 208 and storage equipment 212, pass through the communication connection between the realization of bus 210.
Processor 202 is the control centre for calculating equipment 200, for executing relative program, to realize technical solution provided by the embodiment of the present invention.Optionally, processor 202 includes one or more central processor units (Central Processing Unit, CPU), for example, central processor unit shown in Fig. 21 and central processor unit 2.Optionally, calculating equipment 200 can also include multiple processors 202, each processor 202 can be single core processor (comprising a CPU) or multi-core processor (comprising multiple CPU).Unless otherwise indicated, in the present invention, one for executing the component of specific function, such as, processor 202 or internal storage location 204, corresponding function can be executed by configuring a general component to realize, can also be realized by a special personal module for executing specific function, the application is defined not to this.Processor 202 can use general central processing unit, microprocessor, application specific integrated circuit (Application SQecific Integrated Circuit, ASIC), or one or more integrated circuits, for executing relative program, to realize technical solution provided herein.
Processor 202 can be connected by bus 210 with one or more storage schemes.Storage scheme may include internal storage location 204 and storage equipment 212.Wherein, storage equipment 212 can be read-only memory (Read Only Memory, ROM), static storage device, dynamic memory or random access memory (Random Access Memory, RAM).Internal storage location 204 can be random access memory.Internal storage location 204 can integrate or be integrated in the inside of processor 202 with processor 202, be also possible to one or more storage units independently of processor 202.
It can store in storage equipment 212 or internal storage location 204 for the program code executed of the CPU inside processor 202 or processor 202.Optionally, it is stored in the program code (for example, operating system, application program, resource distribution module or communication module etc.) inside storage equipment 212 to be copied into internal storage location 204, device 202 for processing executes.
Storing equipment 212 can be the storage equipment of physical hard disk or its subregion (including small computer system interface storage or global network block device volume), network storage protocol (including the networks such as Network File System NFS or cluster file system), virtual memory facilities file-based (virtual disk mirror image), logic-based volume.It may include high speed random access memory (RAM), also may include nonvolatile memory, such as one or more magnetic disk storage, flash memory or other nonvolatile memories.In some embodiments, storage equipment is also possible to further include and one and multiple processors 202 isolated remote memories, such as the Dropbox to be accessed by communication interface 208 and communication network, the communication network can be internet, Intranet, local area network (LANs), Wide Area Network (WLANs), storage area network (SANs) etc., or the combination of the above network.
Operating system (such as embedded OS of Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS or such as Vxworks etc) includes the various component softwares and/or driver for controlling and managing general system tasks (such as memory management, the control of storage equipment, power management etc.) and facilitate between various software and hardware components to communicate.
The data for receiving input of input/output interface 206 and information, the data such as output operating result.
Communication interface 208 is using the R-T unit for being such as, but not limited to transceiver one kind, to realize the communication calculated between equipment 200 and other equipment or communication network.
Bus 210 may include an access, transmit information between 200 all parts of equipment (such as processor 202, internal storage location 204, input/output interface 206, communication interface 208 and storage equipment 212) calculating.Optionally, bus 210 can be used wired connection type or use wireless communication modes, and the application is defined not to this.
It should be noted that, although calculating equipment 200 shown in Fig. 2 illustrate only processor 202, internal storage location 204, input/output interface 206, communication interface 208, bus 210 and storage equipment 212, but during specific implementation, it should be apparent to a person skilled in the art that calculating equipment 200 also operates normally other necessary devices comprising realizing.
Calculating equipment 200 can be the calculating equipment of general general purpose computer or special purpose, including but not limited to portable computer, personal desktop computer, network server, tablet computer, mobile phone, personal digital assistant (Personal Digital Assistant, PDA) any electronic equipment or both the above or a variety of unit equipments such as, the application do not carry out any restriction to the specific implementation form for calculating equipment 200.
In addition, the calculating equipment 200 of Fig. 2 is only the example of a calculating equipment 200, calculating equipment 200 may include compared to Fig. 2 more perhaps less component shown or to have different component Configuration modes.According to specific needs, it should be apparent to a person skilled in the art that calculating equipment 200 also may include the hardware device for realizing other additional functions.It can also be only comprising realizing device necessary to the embodiment of the present invention, without including whole devices shown in Fig. 2 it should be apparent to a person skilled in the art that calculating equipment 200.Meanwhile various assemblies shown in Fig. 2 can be implemented with the combination of hardware, software or hardware and software.
Hardware configuration and foregoing description shown in Fig. 2 are suitable for various calculating equipment provided by the embodiment of the present invention, are adapted for carrying out various resource allocation methods provided by the embodiment of the present invention.
As shown in Fig. 2, calculating includes resource distribution module in the internal storage location 204 of equipment 200, processor 202 executes the resource distribution module program code, realizes the management and distribution of resource.
Resource distribution module can be made of one or more operational order, so that calculate equipment 200 executes one or more method and steps as described above.Specific method and step is described in detail in the following part of the application.
Fig. 3 is the signaling diagram of the resource allocation process of an embodiment according to the present invention, distributed system includes resource manager 112, node manager 108 and at least two nodes 106, resource manager 112 is used to manage the node resource of the distributed system, node manager 108 is used to start resource container 110 based on node resource, and resource container 110 is packaged with the resource of node 106, for executing the task of application, as shown in figure 3, the resource allocation process includes:
302: resource manager 112 starts application controller 104.
Specifically, resource manager 112 is used to manage the resource of at least two node 106, and starts application controller 104 when meeting trigger timing, and configure the initial specification of the resource pool 114 of the application controller 104 management.
Resource manager 112 can start application controller 104 when system initialization;Can also it is subsequent according to demand, according to demand by user, dynamically started by enabled instruction, such as, resource manager 112 can receive the request for pre-actuating application controller 112, or when receiving the request for being pre-configured with resource pool 114, start the application controller 104;It is subsequent to be started or by resource manager 112 according to itself resource situation, for example, can star the application controller 104 of corresponding application type when frequently receiving the resource request of each application.It should be understood that the embodiment of the present invention does not limit the starting form of application controller 104.
Specifically, resource manager 112 is when starting application controller 104, the initial specification for the resource pool 114 that application controller 104 manages can be configured, so that application controller 104 is subsequent when applying for resource to resource manager 112, the quantity and specification of resource container applied to resource manager 112 can be determined according to the initial specification.
The initial specification of resource pool 114 can be the quantity for the resource container that resource pool 114 initially includes and the specification of each resource container, wherein the specification of resource container is the quantity of the resource category that resource container includes and every a kind of resource;If the specification of resource container is set in advance, resource pool 114 initial specification can be the quantity for the resource container that resource pool 114 initially includes;If the specification of resource container is configured in advance, and resource container has multiple specifications, the resource quantity of resource category and each type in each specification is set in advance, then the initial specification of resource pool 114 can be the number of the resource container for the resource container specification mark and each specification that resource pool 114 initially includes.
The initial specification of resource pool 114 can also be the type for the various resources that resource pool 114 initially includes and the quantity of each resource.
It will be appreciated that the embodiment of the present invention is not defined the form of the initial specification of resource pool 114, the form of expression of resource quantity can be different under different scenes.
Specifically, resource manager 112 can configure the initial specification for the resource pool 114 that application controller 104 manages according to the expected resource requirement information of pre-set application;The initial specification for the resource pool 114 that resource manager 112 can also be managed according to the use information of the node resource for the distributed system being collected into, configuration application controller 104.For example, resource manager 112 can configure the initial specification of biggish resource pool 114 when there is the sufficient node resource being not used by;When the node resource being not used by is less, resource manager 112 can configure the initial specification of lesser resource pool 114.In addition, the initial specification of resource pool 114 can be carried in the enabled instruction of application controller 104 by user, and by resource manager 112 when starting application controller 104, application controller 104 is configured.
It should be understood that, application controller 104 can be corresponded with application, because demand of the different application to resource container is different, the quantity of resource category and each resource in the resource container of corresponding different application can be different, the initial specification of the corresponding resource pool 114 of different application can also be different, and the embodiment of the present invention is not limited thereto.
304: application controller 104 sends first resource request to resource manager 112.
Before application controller 104 can also send first resource request to resource manager 112, also registered to resource manager 112, to facilitate following resource manager 112 to be managed application controller 104.
Application controller 104 can also be registered to a registrar, and the address information of registrar can be issued to client 102, so that subsequent client 102 passes through the address information of registrar inquiry application controller 104.
The type of application and the corresponding relationship of application controller 104 can be preserved in registrar, the type of application can be MapReduce, Giraph, Storm, Spark, Tez/Impala or MPI etc., for example, registrar, which preserves Spark, applies the application controller 104 applied with corresponding Spark Corresponding relationship, when the application run in client 102 is Spark, then client 102 can find the address information of the application controller 104 of corresponding Spark application according to the corresponding relationship.Or individual registrar is arranged in the application of a certain type, for example, corresponding registrar can be arranged exclusively for Spark application.The embodiment of the present invention is not defined the specific implementation of registrar.
Optionally, every a kind of application can correspond to multiple application controllers 104, and multiple application controller 104 can be used for different users, so as to facilitate the extension of distributed system scale.
During specific implementation, it can safeguard that the corresponding relationship between client 102 and application controller 104, or the multiple registrar of setting, each registrar correspond to different users on registrar.It will be appreciated that the implementation of the quantity to the corresponding application server of every a kind of application and registrar is not defined the embodiment of the present invention.
Specifically, application controller 104 carries the resource quantity determined according to the initial specification of the resource pool in the first resource request sent to resource manager 112.
Resource quantity can be the specification for the resource container quantity and each resource container that application controller 104 is requested to resource manager 112, wherein the specification of resource container refers to the quantity for resource category and each resource for including in resource container.Wherein, the resource for including in each resource container may include: one of processor resource, memory source, network, disk etc. are a variety of.It should be understood that the quantity of resource category and each resource in the resource container of corresponding request can be different, and the embodiment of the present invention is not limited thereto according to the difference of application type.
If the specification of resource container is configured in advance, the quantity of the resource category and each resource that include in resource container is all set in advance, then the resource quantity for the request that application controller 104 is carried into the first resource request that resource manager 112 is sent can be the quantity of resource container.If the specification of resource container is configured in advance, and resource container has multiple specifications, the resource quantity of resource category and each type in each specification is set in advance, then resource quantity can be the quantity of the resource container for the resource container specification mark and each specification that application controller 104 is carried into the first resource request that resource manager 112 is sent.
Resource quantity can also be the type for the various resources that application controller 104 needs and the quantity of each resource.
It will be appreciated that the embodiment of the present invention is not defined the form for the resource quantity requested in first resource request, the form of expression of resource quantity can be different under different scenes.
During specific implementation, the nodal information and/or rack information where the resource container that application controller 104 is requested can also be carried in first resource request.For example, application controller 104 can the shorter host of link preferably between the application controller 104, the node of the resource container as operation request more effectively controls resource pool 114 to realize.
306: resource manager 112 determines node, distributes resource container on determining node for application controller 104.
Resource manager 112 is responsible for global resource management and distribution, after the first resource that resource manager 112 receives the resource pool 114 that application controller 104 is sent according to the initial specification of the resource pool 114 is requested, it is requested according to the first resource, distributes initial resource container for the resource pool.Specifically, after resource manager 112 receives first resource request, it is first determined optional node, and according to the resource quantity requested in the request of the first resource of the resource pool 114, initial resource container is distributed on optional node for the resource pool 114.
Optionally, if carrying the preferred host node of resource container and/or rack of request in first resource request, after resource manager 112 receives first resource request, preferentially resource container is distributed for application controller 112 from these host nodes and/or rack, if the host node and/or rack load requested in first resource request are currently unable to satisfy, such as the host of request is because of loading problem, it is unable to satisfy request, then resource container can be distributed for application controller 112 in the rack where the node, if rack is because load balancing is unable to satisfy request, then resource container can be distributed for application controller 112 in the adjacent rack of the rack.
In alternatively possible implementation, if not having to carry the preferred host of resource container requested or rack in first resource request, then resource manager 112 can be that application controller 104 distributes resource container, or distributes resource in the shorter host of link or rack preferably between application controller 104 for application controller 104 according to the load balancing of node.
It will be appreciated that the embodiment of the present invention is not defined the strategy that resource manager 112 is the distribution resource container of application controller 104.
308: resource manager 112 sends first resource assignment messages to application controller 104.
Specifically, resource manager 112 sends the first resource assignment messages of resource pool 114, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the resource pool 114 that resource manager 112 is the management of application controller 104 to application controller 104.
Specifically, can carry resource manager 112 in first resource assignment messages is application controller The specification of each resource container of 104 distribution and the information of the node where each resource container.The specification of resource container is that resource container includes the type of resource and the quantity of each resource.
If the specification of resource container is that system configures in advance, the quantity of the resource category and each resource that include in resource container is all set in advance, the information of the node where each resource container can be then carried in first resource assignment messages, if resource manager 112 distributes multiple resource containers on the same node for application controller 104, the resource container number distributed in each node can also be carried in first resource assignment messages.
If the specification of resource container is configured in advance, and resource container has multiple specifications, the resource quantity of resource category and each type in each specification is set in advance, the specification mark of the resource container of distribution and the information of each resource container place node can be then carried in first resource assignment messages.
During specific implementation, after resource manager 112 receives the request of the first resource from application controller 104, the resource met the requirements may can't be returned to for application controller 104 immediately, and application controller 104 is needed constantly to communicate with resource manager 112, detect the resource that is assigned to, and be pulled through using.
310: application controller 104 starts resource container.
Application controller 104 sends starting request to node manager, and requesting node manager starts the initial resource container of resource pool 114.
Specifically, application controller 104 is after the resource container that resource manager 112 gets as its distribution, can starting request be sent to the node where each resource container respectively, more specifically, starting request is sent to the node manager of the node where each resource container, to start resource manager 112 as the resource container of its distribution.
Wherein, the specification of resource container is also carried in starting request, the specification of resource container is that resource container includes the type of resource and the quantity of each resource.
If the specification of resource container is configured in advance, and resource container has multiple specifications, and the resource quantity of resource category and each type in each specification is set in advance, then the specification mark of the resource container of request starting is also carried in starting request.
Optionally, if resource manager 112 is that application controller 104 distributes multiple resource containers on the same node, request can be carried in one-shot request and start multiple resource container.
After the node manager of node where resource container receives starting request, resource localization is carried out first, that is the working directory of establishing resource container, and from distributed document system (Hadoop Distributed File System, HDFS) various resources (jar packet, executable file etc.) etc. needed for downloading-running resource container, then start resource container.
After application controller 104 starts resource manager 112 for the initial resource container that resource pool 114 distributes by node manager, the resource container after starting just constitutes resource pool 114.
Because the resource container in resource pool 114 has all been starting state, when being connected to task, can quickly it execute, the starting time before avoiding task, to accelerate the execution speed to the task of application.
312: application controller 104 receives the resource allocation request from client 102.
Wherein, operation has application in client 102, and the type of the application can be MapReduce, Giraph, Storm, Spark, Tez/Impala or MPI etc..
When the application run in client 102 needs resource to carry out task processing, then resource allocation request is sent to application controller by client 102.
During specific implementation, client 102 can inquire the address information of the application controller 104 of the corresponding application by a registrar, and send resource allocation request to the application controller 104 of corresponding address information instruction.Wherein, the corresponding informance of application controller 104 and application is preserved in registrar, different applications can possess different application controllers 104.
Because different types of application is different to the resource requirement of resource container, the specification of the resource container of different applications is varied, and for every a kind of one application controller 104 of application configuration and resource pool 114, the rational utilization of resource container may be implemented.
It is illustrated with Spark application, specific implementation process can be with are as follows: user passes through spark-submit and submits a spark application, the program of user can automatically create a SparkContext, wherein SparkContext is the external interface that Spark is supplied to that user is used to operate Spark, it will create a DAG scheduler (DAGScheduler) and task dispatcher (TaskScheduler) inside SparkContext, wherein DAGScheduler is used to carry out calculating scheduling according to the dependence of the DAG of application, TaskScheduler carries out the calculating scheduling of task, TaskScheduler will create a scheduling Device rear end (SchedulerBackend).SchedulerBackend searches Spark and applies the address information of corresponding application controller 104 by inquiry registrar, and sends corresponding application controller 104 for resource allocation request.
The resource requirement information for the application that client 102 is requested to application controller 104 is carried in resource allocation request.
Wherein, the resource requirement information of the application in resource allocation request can be the resource container quantity of request and the specification of each resource container.The specification of resource container is that resource container includes the type of resource and the quantity of each resource.
If the specification of resource container is that system configures in advance, i.e., the quantity of the resource category and each resource that include in resource container is all set in advance, then the resource requirement information applied can be the resource container quantity of request.
If the specification of resource container is configured in advance, and resource container has multiple specifications, the quantity of the resource of resource category and each type in each specification is set in advance, then the resource requirement information applied can be the number of the resource container of the specification mark and each specification of the resource container of request.
The resource requirement information of application in resource allocation request can also be the type for the various resources that client 102 is requested to application controller 104 and the quantity of each resource.
It optionally, also include the user right information of client 102 in resource allocation request, after application controller 104 receives resource allocation request, according to preset user right library, verify the user right information of client 102, wherein user right library includes the user right information of different user.If not including the user right information of the client 102 in user right library, refuse or be not responding to the resource allocation request of client 102;If including the user right information of the client 102 in user right library, following steps are executed.
314: application controller 104 is that client 102 distributes resource container.
After application controller 104 receives the resource allocation request from client 102, according to the resource requirement information of the application in resource allocation request, idle resource container is selected to distribute to client 102 from resource pool 114.
Specifically, after application controller 104 receives the resource allocation request from client 102, the idle resource container in resource pool 114 is determined first, and according to the resource requirement information of the application carried in resource allocation request, distributes resource container from idle resource container for client 102.Wherein, idle resource container refers to currently without the resource container for being assigned away the executing application of the task.
Because the resource container in the resource pool 114 that application controller 104 controls can distribute to the use of multiple client 102 simultaneously, but a resource container can only be performed simultaneously what a client 102 was distributed Task, so application controller 104 needs to determine the resource container of current idle first before distributing resource container for client 102, to distribute its resource requested from idle resource container for client 102.
Application controller 104 can be by sending query messages to each of resource pool 114 resource container, to determine whether the current resource container is in idle condition.
Preferably, application controller 104 safeguards the status information of each resource container in resource pool 114, the status information indicates whether resource container is in idle condition, if resource container is currently assigned away, other tasks are currently running, then the state of the resource container is not idle, if resource container is currently without being assigned away, other tasks are not run, then the state of the resource container is the free time.
After application controller 104 receives the resource allocation request of client 102, it can be according to the status information of each resource container in resource pool 114, determine resource container idle in resource pool 114, then the resource requirement information of the application carried according to resource allocation request distributes resource container from the resource container of current idle for client 102.
Application controller 104 selects idle resource container to distribute to client 102 from resource pool 114 can be with specifically: application controller 104 is according to the status information of resource container each in resource pool 114, resource container idle in resource pool 114 is selected, and resource container idle in selected resource pool 114 is distributed into client 102.
For convenience, it is that the resource container that client 102 is distributed is known as first resource container group by application controller 104, includes at least one resource container in the first resource container group.
If application controller 104 safeguards the status information of each resource container in resource pool 114, after then the resource container in first resource container group is distributed to client 102 by application controller 104, also set not idle for the state of each resource container in first resource container group.
Optionally, application controller 104 also determines the number of the resource container of remaining free time in resource pool 114, if the number of the resource container of remaining free time is less than preset first threshold, then Secondary resource request is sent to resource manager 112, and receive the Secondary resource assignment messages of the resource pool 114 of the transmission of resource manager 112, according to the Secondary resource assignment messages of the resource pool 114, starting request is sent to node manager, the starting of requesting node manager is the newly-increased resource container that resource pool 114 distributes.Herein, can carry the resource quantity of request in Secondary resource request, the resource quantity of request can be the difference between first threshold and current idle resource container number, or with the difference correlation.Wherein, the form of Secondary resource request is similar with the form that first resource is requested, and details are not described herein, Secondary resource assignment messages are similar with first resource assignment messages, and details are not described herein.
During specific implementation, application server 104 can be after distributing to client 102 for the resource container in first resource container group, or determines according to the preset period number of the resource container of remaining free time in resource pool 114.It will be appreciated that simultaneously inventive embodiments application server 104 determines that the number object time of the resource container of remaining free time and mode are not defined in resource pool 114.
316: application controller 104 sends instruction message to each of first resource container group resource container, and the mark of client 102 is carried in instruction message.
The mark of client 102 is also carried in the resource allocation request that client 102 is sent to application controller 104, application controller is used to indicate to the instruction message that each of first resource container group resource container is sent each of first resource container group resource container distributing to client 102.During specific implementation, client 102 identifies the port numbers that can be the address information of client 102 and communicate with the resource container in first resource container group.
318: each of first resource container group resource container sends registration message to client 102.
The identification information of resource container is carried in registration message, the identification information of resource container is the identification information for going out resource container for client unique identification.Optionally, identification information be resource container where address of node information and resource container the node information.
The specification of resource container, the i.e. quantity of resource category in resource container and each resource can also be carried in registration message.
If the specification of resource container is configured in advance, and resource container has multiple specifications, and the resource quantity of resource category and each type in each specification is set in advance, then the specification mark of resource container can be carried in registration message.
320: it is the resource container that client 102 is distributed that the operation of application is distributed to application controller 114 by client 102.
After client 102 is according to the registration message for receiving the resource container in first resource container group, the operation of application can be divided at least one task, and each task is sent respectively to a resource container in first resource container group.
322: application controller 114 is that the implementing result of task is sent to client 102 by the resource container that client 102 is distributed.
Resource container in first resource container group is by after the completion of the task execution for distributing to it, by task Implementing result is sent to client 102.It should be understood that implementing result herein can be actual task action result, for not needing returning the result for task, implementing result herein can be a task and complete instruction message.
324: client 102 terminates the connection with the resource container in first resource container group.
After client 102 receives the task action result of the return of the resource container in first resource container group, sending to the resource container of first resource container group terminates connection message, terminate the connection with the resource container in first resource container group, discharges resource container resource.
326: the resource container in first resource container group sends state update message to application controller 104.
After client 102 discharges the resource container resource in first resource container group, the resource container in first resource container group can send state update message to application controller 104, show to can receive new task.
If application controller 104 safeguards the status information of each resource container in resource pool 114, after then application controller 104 receives the state update message of the resource container in first resource container group, it can set the state of corresponding resource container to idle, when there is new resource allocation request, alternative resource container allocation can be used as to client 102.
Optionally, application controller 104 also determines the number of the resource container of remaining free time in resource pool 114, if the number of the resource container of remaining free time is greater than preset second threshold, then at least one resource container into idle resource container sends resource release message, and the resource release message is used to discharge the resource that at least one described resource container occupies.The number of the resource container of release can for current idle resource container number and second threshold between difference, or with the difference correlation.
Optionally, application server 104 also safeguards the free time of each resource container in resource pool 114, when the free time for having resource container in resource pool 114 being greater than preset third threshold value, application server 104 sends resource release message to the resource container that free time is greater than preset third threshold value.
Optionally, when the number of the resource container of remaining free time is greater than preset second threshold, application server 104 preferentially sends resource release message to the resource container that free time is greater than preset third threshold value.Or when the number of the resource container of remaining free time is greater than preset second threshold, and when having the free time of resource container to be greater than preset third threshold value in resource pool 114, application server 104 sends resource release message to the resource container that free time is greater than preset third threshold value.
During specific implementation, application server 104 can receive the money in first resource container group The state update message of source container after setting idle state for the resource container in first resource container group again, or determines according to the preset period number of the resource container of remaining free time in resource pool 114.It will be appreciated that simultaneously inventive embodiments application server 104 determines that the number object time of the resource container of remaining free time and mode are not defined in resource pool 114.
It should be understood that because demand of every a kind of application to the specification of resource container is different during specific implementation, application controller 104 and resource pool 114 being respectively configured for every a kind of application, can be realized the reasonable utilization of resource.But the embodiment of the present invention is defined not to this, can share an application controller 104 and resource pool 114 with multiclass application.
Disclosed technical solution according to embodiments of the present invention, apply for resource container in advance to resource manager in advance by application controller, and the resource container of pre-cooling request, after receiving the resource allocation request of application, the timely distribution of resource container resource may be implemented, avoid the waiting time of resource container starting, and pass through the reuse to resource container in resource pool, the resource consumption for avoiding the resource consumption repeatedly opened and closed to resource container and multiple application managers being answered to open and close, the resource container in resource pool is directly managed by application controller, realize more flexible management.
Fig. 4 is the signaling diagram of the resource allocation process of an embodiment according to the present invention, as shown in figure 4, resource allocation process includes:
Step 402-410 is referring to Fig. 3 embodiment step 302-310, and details are not described herein.
412: client 102 is to 104 sending application operation of application controller.
Wherein, the application for having user is run in client, the type of the application can be MapReduce, Giraph, Storm, Spark, Tez/Impala or MPI etc..
When the application run in client needs resource to carry out task processing, then pass through client 102 to application controller sending application operation.
During specific implementation, client 102 can inquire the address information of the application controller 104 of the corresponding application by a registrar, and send application job to the application controller 104 of corresponding address information instruction.Wherein, the corresponding informance of application controller 104 and application is preserved in registrar, different applications can possess different application controllers 104.
Because different types of application is different to the resource requirement of resource container, the specification of the resource container of different applications is varied, so being one application controller 104 of each class application configuration and resource pool, the rational utilization of resource container may be implemented.
414: application controller 104 is that the application job of client 102 distributes resource container.
During specific implementation, after application controller 104 receives the application job of the transmission of client 102, the idle resource container in resource pool 114 is determined first, and according to the scale of the application job, the application job is divided at least one task, and according to the quantity of task, resource container is distributed for the application job of client 102 from idle resource container.
If there are many resource containers of specification in resource pool 114, because the resource quantity of resource category that different task types needs or every kind of resource is different, then application controller 104 is the resource container of different task distribution different sizes also according to the type of task.Such as, application type is MapReduce, then task can be Map type or Reduce type, and demand of the possible Map task with Reduce task to resource container resource is different, then application controller 104 can distribute different types of resource container for different types of resource container.
Because the resource container in the resource pool 114 that application controller 104 controls can distribute to the use of multiple client 102 simultaneously, but a resource container can only be performed simultaneously the task of a client 102 distribution, so application controller 104 is before distributing resource container for client 102, need to determine the resource container of current idle first, to distribute resource from idle resource container for the application job of client 102.
Application controller 104 can be by sending query messages to each of resource pool 114 resource container, to determine whether the current resource container is in idle condition.
Preferably, application controller 104 safeguards the status information of each resource container in resource pool 114, the status information is for indicating whether resource container is in idle condition, if resource container is currently assigned away, other tasks are currently running, then the state of the resource container is not idle, if resource container is currently without being assigned away, other tasks are not run, then the state of the resource container is the free time.
Application controller 104 can determine resource container idle in resource pool 114 according to the status information of each resource container in resource pool 114.
For convenience, the resource container that the application task that application controller 104 is client 102 distributes is known as Secondary resource container group, includes at least one resource container in the Secondary resource container group.
If application controller 104 safeguards the status information of each resource container in resource pool 114, after the task for the application job that then resource container in Secondary resource container group is distributed to client 102 by application controller 104, also set not idle for the state of each resource container in Secondary resource container group.
Optionally, application controller 104 also determines the number of the resource container of remaining free time in resource pool 114, if the number of the resource container of remaining free time is less than preset first threshold, then Secondary resource request is sent to resource manager 112, and receive the Secondary resource assignment messages of the resource pool 114 of the transmission of resource manager 112, according to the Secondary resource assignment messages of the resource pool 114, application controller 104 sends starting request to node manager, and the starting of requesting node manager is the newly-increased resource container that resource pool 114 distributes.Herein, the resource quantity of Secondary resource request request can be the difference between first threshold and current idle resource container number, or with the difference correlation.
During specific implementation, application server 104 can be after distributing to the application job of client 102 for the resource container in Secondary resource container group, or determines according to the preset period number of the resource container of remaining free time in resource pool 114.It will be appreciated that simultaneously inventive embodiments application server 104 determines that the number object time of the resource container of remaining free time and mode are not defined in resource pool 114.
416: application controller 104 issues task to each of Secondary resource container group resource container.
The operation of client 102 is divided at least one task by application controller 104, and after choosing a resource container for each task, can be by resource container of the corresponding mission dispatching into Secondary resource container group.
418: application controller 104 receives the task action result that each resource container returns in Secondary resource container group.
After the task execution that resource container in Secondary resource container group issues application controller 104, the implementing result of task can be returned to application controller 104.It should be understood that implementing result herein can be actual task action result, for not needing returning the result for task, implementing result herein can be a task and complete instruction message.
If application controller 104 safeguards the status information of each resource container in resource pool 114, after then application controller 104 receives the task action result that the resource container in Secondary resource container group returns, it can set the state of corresponding resource container to idle, when there is new application job, alternative resource container allocation can be used as to the new application job.
Optionally, application controller 104 also determines the number of the resource container of remaining free time in resource pool 114, if the number of the resource container of remaining free time is greater than preset second threshold, then at least one resource container into idle resource container sends resource release message, and the resource release message is used to discharge the resource that at least one described resource container occupies.The number of the resource container of release can be current Difference between idle resource container number and second threshold, or with the difference correlation.
Optionally, application server 104 also safeguards the free time of each resource container in resource pool 114, when the free time for having resource container in resource pool 114 being greater than preset third threshold value, application server 104 sends resource release message to the resource container that free time is greater than preset third threshold value.
Optionally, when the number of the resource container of remaining free time is greater than preset second threshold, application server 104 preferentially sends resource release message to the resource container that free time is greater than preset third threshold value.Or when the number of the resource container of remaining free time is greater than preset second threshold, and when having the free time of resource container to be greater than preset third threshold value in resource pool 114, application server 104 sends resource release message to the resource container that free time is greater than preset third threshold value.
During specific implementation, application server 104 can be in the implementing result for receiving the return of each of Secondary resource container group resource container, after the resource container of Secondary resource container group is re-set as after idle state, or determine according to the preset period number of the resource container of remaining free time in resource pool 114.It will be appreciated that simultaneously inventive embodiments application server 104 determines that the number object time of the resource container of remaining free time and mode are not defined in resource pool 114.
420: the implementing result of the application job of client 102 is returned to client 102 by application controller 104.
In specific implementation, after the implementing result that application controller 104 can return to each resource container in Secondary resource container group merges, the implementing result after merging is sent to client 102.
It should be understood that because demand of every a kind of application to the specification of resource container is different during specific implementation, application controller 104 and resource pool 114 being respectively configured for every a kind of application, can be realized the reasonable utilization of resource.But the embodiment of the present invention is defined not to this, can share an application controller 104 and resource pool 114 with multiclass application.
Disclosed technical solution according to embodiments of the present invention, apply for resource container in advance to resource manager in advance by application controller, and the resource container of pre-cooling request, after receiving the application job of client, the timely distribution of resource container resource may be implemented, avoid the waiting time of resource container starting, and pass through the reuse to resource container in resource pool, the resource consumption for avoiding the resource consumption repeatedly opened and closed to resource container and multiple application managers being answered to open and close, the resource container in resource pool is directly managed by application controller, realize more flexible management.
Fig. 5 is the logical construction schematic diagram of the distributor 500 of resource container in the distributed system of an embodiment according to the present invention, and distributed system includes device 500 and node manager, and device 500 is used for The node resource of managing distributing type system, node manager are used to start resource container based on node resource, and resource container is used to execute the task of application, as shown in Figure 5, device 500 includes start unit 502, receiving unit 504, allocation unit 506 and processing unit 508, wherein
Start unit 502 for starting application controller when meeting trigger timing, and configures the initial specification of the resource pool of application controller management.
Wherein, start unit 502 can start the application controller when receiving the request for pre-actuating application controller, or receiving the request for being pre-configured with resource pool.Start unit 502 can start when system initialization;Can also it is subsequent according to demand, according to demand by user, dynamically started by enabled instruction;Or by resource manager according to itself resource situation, subsequent to be started, the embodiment of the present invention does not limit the starting form of application controller.
Specifically, start unit 502 according to the expected resource requirement information of pre-set application, can configure the initial specification of the resource pool of application controller management;Start unit 502 according to the use information of the node resource for the distributed system that device 500 is collected into, can also configure the initial specification of the resource pool of application controller management.For example, start unit 502 can configure the initial specification of biggish resource pool when there is the sufficient node resource being not used by;When the node resource being not used by is less, start unit 502 can configure the initial specification of lesser resource pool.In addition, the initial specification of resource pool can be carried in the enabled instruction of application controller by user, and application controller is configured when starting application controller by start unit 502.
During specific implementation, receiving unit 502 can processor 202 as shown in Figure 2, internal storage location 204 and communication interface 208 realize.More specifically, the communication module and resource distribution module in internal storage location 204 can be executed by processor 202, so that communication interface 208 passes through instruction starting application server.
Receiving unit 504, the first resource for receiving the resource pool that application controller is sent according to the initial specification of resource pool are requested.
During specific implementation, receiving unit 504 can processor 202 as shown in Figure 2, internal storage location 204 and communication interface 208 realize.More specifically, the communication module in internal storage location 204 can be executed by processor 202, so that communication interface 208 receives the resource request for the resource pool that application controller is sent according to the initial specification of resource pool.
Allocation unit 506 distributes initial resource container for requesting according to first resource for resource pool.
During specific implementation, allocation unit 506 can processor 202 as shown in Figure 2 and internal storage location realize.More specifically, the resource allocation in internal storage location 204 can be executed by processor 202 Module distributes the node resource of resource pool for application controller.
Transmission unit 508, for sending the first resource assignment messages of the resource pool, the information of the node where the initial resource container distributed in first resource assignment messages comprising allocation unit 506 for the resource pool to application controller.
During specific implementation, transmission unit 508 can processor 202 as shown in Figure 2, internal storage location 204 and communication interface 208 realize.More specifically, the communication module in internal storage location 204 can be executed by processor 202, so that communication interface 208 sends the first resource assignment messages of resource pool to application controller.
The embodiment of the present invention is the Installation practice of resource manager in Fig. 3 and Fig. 4 embodiment, and the feature description of Fig. 3 and Fig. 4 embodiment part is suitable for the embodiment of the present invention, details are not described herein.
Fig. 6 is the logical construction schematic diagram of the distributor 600 of resource container in the distributed system of an embodiment according to the present invention, distributed system includes resource manager and node manager, resource manager is used for the node resource of managing distributing type system, node manager is used to start resource container based on node resource, resource container is used to execute the task of application, resource manager starter 600 when meeting trigger timing, the initial specification for the resource pool that configuration device 600 manages, and initial resource container is distributed for the resource pool according to the initial specification of resource pool, initial resource container has been turned in resource pool;
Device 600 includes:
Receiving unit 602, for receiving the resource allocation request from client, which is used to be the application request resource container run in the client, and the resource requirement information of the application is carried in the resource allocation request.
During specific implementation, receiving unit 602 can processor 202 as shown in Figure 2, internal storage location 204 and communication interface 208 realize.More specifically, the communication module in internal storage location 204 can be executed by processor 202, so that communication interface 208 receives the resource allocation request from client.
Allocation unit 604 selects idle resource container to distribute to the client for the resource requirement information according to the application from the resource pool.
During specific implementation, allocation unit 604 can processor 202 as shown in Figure 2 and internal storage location realize.More specifically, the resource distribution module in internal storage location 204 can be executed by processor 202, and the node resource of resource pool is distributed for application controller.
As shown in Figure 7, device 600 further includes transmission unit 606, receiving unit 602 receives before the resource allocation request from client, transmission unit 606 is used to send first resource request to resource manager according to the initial specification of the resource pool, carries in first resource request true according to the initial specification of resource pool Fixed resource quantity;Receiving unit 602 is also used to receive the first resource assignment messages of the resource pool of resource manager transmission, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the resource manager for the resource pool;Transmission unit 606 is also used to send starting request to the node manager, and the node manager is requested to start the initial resource container of the resource pool.
Specifically, it include the mark of client in resource allocation request, allocation unit 604 in resource pool from selecting after idle resource container distributes to client, transmission unit 606 is used for each resource container into the resource container for distribute to client and sends instruction message, the mark of client is carried in instruction message, instruction message, which is used to indicate, distributes to client for each resource container.
As shown in Figure 7, device 600 further includes determination unit 608, determination unit 608 is used to determine the number of the resource container of remaining free time in resource pool, if the number of the resource container of remaining free time is less than preset first threshold, transmission unit 606 is used to send Secondary resource request to resource manager, receiving unit 602 is also used to receive the Secondary resource assignment messages of the resource pool of resource manager transmission, transmission unit 606 is also used to the Secondary resource assignment messages according to the resource pool, starting request is sent to node manager, the starting of requesting node manager is the newly-increased resource container of resource pool distribution.
If the number of the resource container of remaining free time is greater than preset second threshold, at least one resource container that then transmission unit 606 is used for into idle resource container sends resource release message, and resource release message is used to discharge the resource of at least one resource container occupancy.
Optionally, allocation unit 604 is also used to safeguard the status information of each resource container in the resource pool, the status information indicate whether corresponding resource container is idle;Allocation unit 604 is used to from selecting idle resource container to distribute to the client in resource pool include: allocation unit 604 for the status information according to resource container each in the resource pool, resource container idle in the resource pool is selected, and resource container idle in the selected resource pool is distributed into the client.
Allocation unit 604 in resource pool from selecting to be also used to set not idle for the state for distributing to each of the resource container of client resource container after idle resource container distributes to client.
After allocation unit 604 sets not idle for the state of each of the resource container for distributing to client resource container, receiving unit 602 is also used to receive the state update message of each resource container in the resource container for distribute to client, and state update message is used to indicate the completing client distribution of the task;Allocation unit 604 is also used to set idle for the state of each resource container in the resource container for distributing to client according to state updating information.
It optionally, also include user right information in resource allocation request;Receiving unit 602 is also used to verify user right information according to preset user right library, and user right library includes user right information. The embodiment of the present invention is the Installation practice of application controller in Fig. 3 embodiment, and the feature description of Fig. 3 embodiment part is suitable for the embodiment of the present invention, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method may be implemented in other ways.Such as, the apparatus embodiments described above are merely exemplary, such as, the division of the module, only a kind of logical function partition, there may be another division manner when realization, such as multiple module or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or module, can be electrical property, mechanical or other forms.
The module as illustrated by the separation member may or may not be physically separated, and the component shown as module may or may not be physical module, it can and it is in one place, or may be distributed on multiple network modules.Some or all of the modules therein can be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
In addition, each functional module in each embodiment of the present invention can integrate in a processing module, it is also possible to modules and physically exists alone, can also be integrated in two or more modules in a module.Above-mentioned integrated module both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
The above-mentioned integrated module realized in the form of software function module, can store in a computer readable storage medium.Above-mentioned software function module 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.) executes the part steps of each embodiment the method for the present invention.And storage medium above-mentioned includes: mobile hard disk, read-only memory (English: Read-Only Memory, abbreviation ROM), random access memory (English: Random Access Memory, abbreviation RAM), the various media that can store program code such as magnetic or disk.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although the present invention is described in detail referring to the foregoing embodiments, those skilled in the art should understand that: it is still possible to modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;And these are modified or replaceed, the protection scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (29)

  1. A kind of distributed system, which is characterized in that the distributed system includes resource manager and node manager;
    The resource manager, for starting application controller when meeting trigger timing, configure the initial specification of the resource pool of the application controller management, and the first resource for receiving the resource pool that the application controller is sent according to the initial specification of the resource pool is requested, it is requested according to the first resource, initial resource container is distributed for the resource pool, Xiang Suoshu application controller sends the first resource assignment messages of the resource pool;
    The application controller, for obtaining the first resource assignment messages for the resource pool that the resource manager is sent, according to indicated in the first resource assignment messages of the resource pool be node where the initial resource container of resource pool distribution information, request the node manager to start the initial resource container of the resource pool;
    The node manager starts the initial resource container for the request according to the application controller.
  2. System according to claim 1, it is characterized in that, it includes: that the resource manager is receiving the request for pre-actuating the application controller that the resource manager, which is used to start application controller when meeting trigger timing, or when being pre-configured with the request of the resource pool, start the application controller.
  3. System according to claim 1 or 2, it is characterized in that, the initial specification for the resource pool that the resource manager is used to configure the application controller management includes: the resource manager for the expected resource requirement information according to the pre-set application, or the use information of the node resource according to the distributed system being collected into, configure the initial specification of the resource pool of the application controller management.
  4. System according to claim 1-3, it is characterized in that, the application controller is also used to: receiving the resource allocation request from client, the application request resource container that the resource allocation request is used for run in the client, and according to the resource requirement information of the application in the resource allocation request, idle resource container is selected to distribute to the client from the resource pool.
  5. System according to claim 4, it is characterized in that, it include the mark of the client in the resource allocation request, the application controller in the resource pool from selecting to be also used to: each money into the resource container for distributing to the client after idle resource container distributes to the client Source container sends instruction message, and the mark of the client is carried in the instruction message.
  6. System according to claim 1-5, it is characterized in that, the application controller is also used to: determining the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, then Secondary resource request is sent to the resource manager, receive the Secondary resource assignment messages for the resource pool that the resource manager is sent, and according to the Secondary resource assignment messages of the resource pool, starting request is sent to the node manager, requesting the node manager starting is the newly-increased resource container of resource pool distribution.
  7. System according to claim 1-6, it is characterized in that, the application controller is also used to: determining the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, at least one resource container into idle resource container sends resource release message.
  8. The distribution method of resource container in a kind of distributed system, it is characterized in that, distributed system includes resource manager and node manager, the resource manager is used to manage the node resource of the distributed system, the node manager is used to start resource container based on the node resource, and the resource container is used to execute the task of application;
    The described method includes:
    The resource manager starts application controller when meeting trigger timing, and configures the initial specification of the resource pool of the application controller management;
    The first resource that the resource manager receives the resource pool that the application controller is sent according to the initial specification of the resource pool is requested;
    The resource manager is requested according to the first resource, distributes initial resource container for the resource pool;
    The resource manager sends the first resource assignment messages of the resource pool, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the resource manager for the resource pool to the application controller.
  9. According to the method described in claim 8, it is characterized in that, the resource manager starts application controller when meeting trigger timing includes:
    The resource manager receives the request for pre-actuating the application controller, or when being pre-configured with the request of the resource pool, starts the application controller.
  10. Method according to claim 8 or claim 9, which is characterized in that the initial specification that the resource manager configures the resource pool of the application controller management includes:
    The resource manager configures the initial specification of the resource pool of the application controller management according to the expected resource requirement information of the pre-set application;Alternatively,
    The resource manager configures the initial specification of the resource pool of the application controller management according to the use information of the node resource for the distributed system being collected into.
  11. The distribution method of resource container in a kind of distributed system, it is characterized in that, distributed system includes resource manager and node manager, the resource manager is used for the node resource of managing distributing type system, the node manager is used to start resource container based on the node resource, the resource manager starts application controller when meeting trigger timing, configure the initial specification of the resource pool of the application controller management, and initial resource container is distributed for the resource pool according to the initial specification of the resource pool, the initial resource container has been turned on;
    The described method includes:
    The application controller receives the resource allocation request from client, and the resource allocation request is used to be the application request resource container run in the client, and the resource requirement information of the application is carried in the resource allocation request;
    The application controller selects idle resource container to distribute to the client according to the resource requirement information of the application from the resource pool.
  12. According to the method for claim 11, which is characterized in that before the application controller receives the resource allocation request from the client, the method also includes:
    The application controller sends first resource request to the resource manager according to the initial specification of the resource pool;
    The application controller obtains the first resource assignment messages for the resource pool that the resource manager is sent, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the resource manager for the resource pool;
    The application controller sends starting request to the node manager, and the node manager is requested to start the initial resource container of the resource pool.
  13. Method according to claim 11 or 12, it is characterized in that, include the mark of the client in the resource allocation request, the application controller from being selected in the resource pool after idle resource container distributes to the client, the method also includes:
    The application controller each resource container into the resource container for distributing to the client sends instruction message, and the mark of the client is carried in the instruction message.
  14. The described in any item methods of 1-13 according to claim 1, which is characterized in that the method is also Include:
    The application controller determines the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, sends Secondary resource request to the resource manager;
    The application controller receives the Secondary resource assignment messages for the resource pool that the resource manager is sent;
    For the application controller according to the Secondary resource assignment messages of the resource pool, Xiang Suoshu node manager, which is sent, starts request, and requesting the node manager starting is the newly-increased resource container of resource pool distribution.
  15. The described in any item methods of 1-14 according to claim 1, which is characterized in that the method also includes:
    The application controller determines the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, at least one resource container into idle resource container sends resource release message.
  16. The described in any item methods of 1-15 according to claim 1, which is characterized in that the application controller safeguards the status information of each resource container in the resource pool, the status information indicate whether corresponding resource container is idle;
    The application controller selects idle resource container to distribute to the client from the resource pool
    The application controller selects resource container idle in the resource pool, and resource container idle in the selected resource pool is distributed to the client according to the status information of resource container each in the resource pool.
  17. The distributor of resource container in a kind of distributed system, it is characterized in that, distributed system includes described device and node manager, described device is used to manage the node resource of the distributed system, the node manager is used to start resource container based on the node resource, the resource container is used to execute the task of application
    Described device includes:
    Start unit for starting application controller when meeting trigger timing, and configures the initial specification of the resource pool of the application controller management;
    Receiving unit, the first resource for receiving the resource pool that the application controller is sent according to the initial specification of the resource pool are requested;
    Allocation unit distributes initial resource container for requesting according to the first resource for the resource pool;
    Transmission unit, for sending the first resource assignment messages of the resource pool, the information of the node where the initial resource container distributed in the first resource assignment messages comprising the allocation unit for the resource pool to the application controller.
  18. Device according to claim 17, which is characterized in that the start unit is for starting application controller when meeting trigger timing, comprising:
    The start unit, which is used to receive in the receiving unit, pre-actuates the request of the application controller, or when being pre-configured with the request of the resource pool, starts the application controller.
  19. Device described in 7 or 18 according to claim 1, which is characterized in that the start unit is used to configure the initial specification of the resource pool of the application controller management, comprising:
    The start unit is used for the expected resource requirement information according to the pre-set application, configures the initial specification of the resource pool of the application controller management;Alternatively,
    The start unit is used for the use information of the node resource according to the distributed system being collected into, and configures the initial specification of the resource pool of the application controller management.
  20. The distributor of resource container in a kind of distributed system, it is characterized in that, distributed system includes resource manager and node manager, the resource manager is used for the node resource of managing distributing type system, the node manager is used to start resource container based on the node resource, the resource manager starts described device when meeting trigger timing, configure the initial specification of the resource pool of described device management, and initial resource container is distributed for the resource pool according to the initial specification of the resource pool, the initial resource container has been turned on;
    Described device includes:
    Receiving unit, for receiving the resource allocation request from client, the resource allocation request is used to be the application request resource container run in the client, and the resource requirement information of the application is carried in the resource allocation request;
    Allocation unit selects idle resource container to distribute to the client for the resource requirement information according to the application from the resource pool.
  21. Device according to claim 20, it is characterized in that, described device further includes transmission unit, before the receiving unit receives the resource allocation request from the client, the transmission unit is used to send first resource request to the resource manager according to the initial specification of the resource pool;
    The receiving unit is also used to: receiving the first money of the resource pool that the resource manager is sent Source assignment messages are the information of the node where the initial resource container of resource pool distribution comprising the resource manager in the first resource assignment messages;
    The transmission unit is also used to: Xiang Suoshu node manager sends starting request, and the node manager is requested to start the initial resource container of the resource pool.
  22. The device according to claim 20 or 21, it is characterized in that, described device further includes transmission unit, it include the mark of the client in the resource allocation request, the allocation unit in the resource pool from selecting after idle resource container distributes to the client, the transmission unit is used for: into the resource container for distributing to the client, each resource container sends instruction message, and the mark of the client is carried in the instruction message.
  23. According to the described in any item devices of claim 20-22, it is characterized in that, described device further includes determination unit, and transmission unit, the determination unit is used to determine the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is less than preset first threshold, the transmission unit is used to send Secondary resource request to the resource manager;
    The receiving unit is also used to: receiving the Secondary resource assignment messages for the resource pool that the resource manager is sent;
    The transmission unit is also used to: according to the Secondary resource assignment messages of the resource pool, Xiang Suoshu node manager sends starting request, and requesting the node manager starting is the newly-increased resource container of resource pool distribution.
  24. According to the described in any item devices of claim 20-23, it is characterized in that, described device further includes determination unit, and transmission unit, the determination unit is used to determine the number of the resource container of remaining free time in the resource pool, if the number of the resource container of remaining free time is greater than preset second threshold, at least one resource container that the transmission unit is used for into idle resource container sends resource release message.
  25. According to the described in any item devices of claim 20-24, which is characterized in that the allocation unit is also used to safeguard the status information of each resource container in the resource pool, the status information indicate whether corresponding resource container is idle;
    The allocation unit is used to from selecting idle resource container to distribute to the client in the resource pool include: the allocation unit for the status information according to resource container each in the resource pool, resource container idle in the resource pool is selected, and resource container idle in the selected resource pool is distributed into the client.
  26. A kind of computer-readable medium, which is characterized in that including computer executed instructions, work as meter When the processor of calculation machine executes the computer executed instructions, the computer perform claim requires the described in any item methods of 8-10.
  27. A kind of calculating equipment characterized by comprising processor, memory, bus and communication interface;
    The memory is executed instruction for storing, the processor is connect with the memory by the bus, when calculating equipment operation, the processor executes the described of memory storage and executes instruction, so that described device perform claim requires the described in any item methods of 8-10.
  28. A kind of computer-readable medium, which is characterized in that including computer executed instructions, when the processor of computer executes the computer executed instructions, the computer perform claim requires the described in any item methods of 11-16.
  29. A kind of calculating equipment characterized by comprising processor, memory, bus and communication interface;
    The memory is executed instruction for storing, the processor is connect with the memory by the bus, when calculating equipment operation, the processor executes the described of memory storage and executes instruction, so that described device perform claim requires the described in any item methods of 11-16.
CN201580084802.8A 2015-12-28 2015-12-28 Distributed system, resource container allocation method, resource manager and application controller Active CN108293041B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/099258 WO2017113074A1 (en) 2015-12-28 2015-12-28 Resource allocation method, device, and system

Publications (2)

Publication Number Publication Date
CN108293041A true CN108293041A (en) 2018-07-17
CN108293041B CN108293041B (en) 2020-10-09

Family

ID=59224029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201580084802.8A Active CN108293041B (en) 2015-12-28 2015-12-28 Distributed system, resource container allocation method, resource manager and application controller

Country Status (2)

Country Link
CN (1) CN108293041B (en)
WO (1) WO2017113074A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111429091A (en) * 2020-03-19 2020-07-17 北京字节跳动网络技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN111694649A (en) * 2020-06-12 2020-09-22 北京字节跳动网络技术有限公司 Resource scheduling method and device, computer equipment and storage medium
CN112015542A (en) * 2019-05-29 2020-12-01 潘仲光 Resource collection method, device and storage medium
CN112083932A (en) * 2020-08-18 2020-12-15 上海交通大学 Function preheating system and method on virtual network equipment
CN112653571A (en) * 2020-08-20 2021-04-13 国家电网公司华中分部 Hybrid scheduling method based on virtual machine and container
CN113391906A (en) * 2021-06-25 2021-09-14 北京字节跳动网络技术有限公司 Job updating method and device, computer equipment and resource management system
CN113395291A (en) * 2021-06-30 2021-09-14 北京爱奇艺科技有限公司 Flow control method and device, electronic equipment and storage medium
CN115827255A (en) * 2023-02-16 2023-03-21 中国电力科学研究院有限公司 Application resource self-adaptive distribution management method and system for concentrator
CN116389172A (en) * 2023-06-05 2023-07-04 国网四川省电力公司信息通信公司 Multi-tenant-based container cloud platform resource security management method

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110109649B (en) * 2018-02-01 2023-08-08 中国电信股份有限公司 Container control method, device and container system for Web service
CN111274022A (en) * 2018-12-05 2020-06-12 北京华胜天成科技股份有限公司 Server resource allocation method and system
CN112052084A (en) * 2019-06-05 2020-12-08 杭州海康威视数字技术股份有限公司 Resource allocation method and computer equipment
CN111427675B (en) * 2020-03-20 2023-03-14 腾讯科技(深圳)有限公司 Data processing method and device and computer readable storage medium
CN113507441B (en) * 2021-06-08 2023-04-28 中国联合网络通信集团有限公司 Secure resource expansion method, secure protection management platform and data node
CN113419839A (en) * 2021-07-20 2021-09-21 北京字节跳动网络技术有限公司 Resource scheduling method and device for multi-type jobs, electronic equipment and storage medium
CN115454391B (en) * 2022-11-11 2023-06-16 零氪科技(北京)有限公司 Client, client construction method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706798B1 (en) * 2013-06-28 2014-04-22 Pepperdata, Inc. Systems, methods, and devices for dynamic resource monitoring and allocation in a cluster system
CN104731595A (en) * 2015-03-26 2015-06-24 江苏物联网研究发展中心 Big-data-analysis-oriented mixing computing system
CN104780146A (en) * 2014-01-13 2015-07-15 华为技术有限公司 Resource manage method and device
CN105045656A (en) * 2015-06-30 2015-11-11 深圳清华大学研究院 Virtual container based big data storage and management method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765870A (en) * 2015-04-26 2015-07-08 成都创行信息科技有限公司 Delay scheduling method related to network data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8706798B1 (en) * 2013-06-28 2014-04-22 Pepperdata, Inc. Systems, methods, and devices for dynamic resource monitoring and allocation in a cluster system
CN104780146A (en) * 2014-01-13 2015-07-15 华为技术有限公司 Resource manage method and device
CN104731595A (en) * 2015-03-26 2015-06-24 江苏物联网研究发展中心 Big-data-analysis-oriented mixing computing system
CN105045656A (en) * 2015-06-30 2015-11-11 深圳清华大学研究院 Virtual container based big data storage and management method

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015542A (en) * 2019-05-29 2020-12-01 潘仲光 Resource collection method, device and storage medium
CN111429091A (en) * 2020-03-19 2020-07-17 北京字节跳动网络技术有限公司 Resource allocation method and device, electronic equipment and storage medium
CN111694649A (en) * 2020-06-12 2020-09-22 北京字节跳动网络技术有限公司 Resource scheduling method and device, computer equipment and storage medium
CN112083932A (en) * 2020-08-18 2020-12-15 上海交通大学 Function preheating system and method on virtual network equipment
CN112653571A (en) * 2020-08-20 2021-04-13 国家电网公司华中分部 Hybrid scheduling method based on virtual machine and container
CN112653571B (en) * 2020-08-20 2024-03-22 国家电网公司华中分部 Mixed scheduling method based on virtual machine and container
CN113391906B (en) * 2021-06-25 2024-03-01 北京字节跳动网络技术有限公司 Job updating method, job updating device, computer equipment and resource management system
CN113391906A (en) * 2021-06-25 2021-09-14 北京字节跳动网络技术有限公司 Job updating method and device, computer equipment and resource management system
CN113395291A (en) * 2021-06-30 2021-09-14 北京爱奇艺科技有限公司 Flow control method and device, electronic equipment and storage medium
CN115827255B (en) * 2023-02-16 2023-04-21 中国电力科学研究院有限公司 Application resource self-adaptive allocation management method and system for concentrator
CN115827255A (en) * 2023-02-16 2023-03-21 中国电力科学研究院有限公司 Application resource self-adaptive distribution management method and system for concentrator
CN116389172A (en) * 2023-06-05 2023-07-04 国网四川省电力公司信息通信公司 Multi-tenant-based container cloud platform resource security management method
CN116389172B (en) * 2023-06-05 2023-09-19 国网四川省电力公司信息通信公司 Multi-tenant-based container cloud platform resource security management method

Also Published As

Publication number Publication date
WO2017113074A1 (en) 2017-07-06
CN108293041B (en) 2020-10-09

Similar Documents

Publication Publication Date Title
CN108293041A (en) A kind of distribution method of resource, device and system
CN103593242B (en) Resource sharing control system based on Yarn frameworks
CN111542064B (en) Container arrangement management system and arrangement method for wireless access network
CN107145380B (en) Virtual resource arranging method and device
KR101245213B1 (en) Method and system for network configuration and/or provisioning based on open virtualization format(ovf) metadata
EP3073374B1 (en) Thread creation method, service request processing method and related device
CN102479099B (en) Virtual machine management system and use method thereof
CN110383764B (en) System and method for processing events using historical data in a serverless system
CN111684419A (en) Method and system for migrating containers in a container orchestration platform between computing nodes
WO2022062650A1 (en) Computing device sharing method and apparatus based on kubernetes, and device and storage medium
WO2020177564A1 (en) Vnf life cycle management method and apparatus
CN108139935A (en) The extension of the resource constraint of service definition container
CN109564528B (en) System and method for computing resource allocation in distributed computing
CN109726005A (en) For managing method, server system and the computer program product of resource
CN103747107A (en) Compatible cloud operating platform and realizing method thereof
CN110830574B (en) Method for realizing intranet load balance based on docker container
CN113296950A (en) Processing method, processing device, electronic equipment and readable storage medium
WO2017185992A1 (en) Method and apparatus for transmitting request message
WO2016183832A1 (en) Network service instantiation method and device
CN114374609A (en) Deep learning operation running method and system based on RDMA (remote direct memory Access) equipment
WO2020108337A1 (en) Cpu resource scheduling method and electronic equipment
WO2019001140A1 (en) Method and device for managing vnf instantiation
CN113014611A (en) Load balancing method and related equipment
CN108073426B (en) Software management method, device and system based on cloud computing
CN108028806A (en) The method and apparatus that virtual resource is distributed in network function virtualization NFV networks

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20220218

Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province

Patentee after: Huawei Cloud Computing Technology Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right