yarn client submission process

Client submit the task to the RM process is roughly divided into seven steps as shown below:

 

 1. Client issues a request to the RM

2. RM returns a response ApplicationID

3. Client response Application Submission Context (ASC) to RM. ASC includes ApplicationID, user, queue, as well as information related to a number of other startup AM, in addition, there is a Container Launch Context (CLC), CLC contains the resource requests (memory and CPU), job files, security token, AM and others to start on a node information. After the task once submitted, client may request the RM to kill the running state of an application or query applications

4. When the RM receives ASC, it dispatches a suitable container to start AM, the container is often referred to as a container 0. AM need to request additional container to run the task, if no suitable container, AM will not start. When a suitable container, RM retransmission request to the appropriate NM, start AM. At this time, URL PRC and monitoring of AM was already established.

5. When you start up the AM, RM respond to information the minimum and maximum resources to the AM cluster. AM must then decide how to use resources that are currently available. YARN unlike fixed resource scheduler request, it is possible to dynamically adjusted based on the current state of the cluster.

6. AM can be used according to the resource from the RM known there, it will request a certain number of some of the container. This request can be very specific, including containers with multiples of the resource minimum values ​​(eg, extra memory).

7. RM scheduling policy will be based, as far as possible to meet the container AM application. Is assigned to the container AM, then the container will be the node manager communicates with AM, AM is necessary to send the configuration to the node manager starts the container of the container.

 

Meanwhile, in a job is running, AM will report on progress with the heartbeat information to the RM, in the course of these heartbeat, AM possible to apply or release the container. When will when the task is completed, AM RM to send a mission to the end and quit. As shown below:

 

 

Guess you like

Origin www.cnblogs.com/gentlemanhai/p/11272009.html