org.apache.hadoop.yarn.api
Interface AMRMProtocol


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface AMRMProtocol

The protocol between a live instance of ApplicationMaster and the ResourceManager.

This is used by the ApplicationMaster to register/unregister and to request and obtain resources in the cluster from the ResourceManager.


Method Summary
 AllocateResponse allocate(AllocateRequest request)
          The main interface between an ApplicationMaster and the ResourceManager.
 FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
          The interface used by an ApplicationMaster to notify the ResourceManager about its completion (success or failed).
 RegisterApplicationMasterResponse registerApplicationMaster(RegisterApplicationMasterRequest request)
          The interface used by a new ApplicationMaster to register with the ResourceManager.
 

Method Detail

registerApplicationMaster

RegisterApplicationMasterResponse registerApplicationMaster(RegisterApplicationMasterRequest request)
                                                            throws org.apache.hadoop.yarn.exceptions.YarnRemoteException

The interface used by a new ApplicationMaster to register with the ResourceManager.

The ApplicationMaster needs to provide details such as RPC Port, HTTP tracking url etc. as specified in RegisterApplicationMasterRequest.

The ResourceManager responds with critical details such as minimum and maximum resource capabilities in the cluster as specified in RegisterApplicationMasterResponse.

Parameters:
request - registration request
Returns:
registration respose
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException

finishApplicationMaster

FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
                                                        throws org.apache.hadoop.yarn.exceptions.YarnRemoteException

The interface used by an ApplicationMaster to notify the ResourceManager about its completion (success or failed).

The ApplicationMaster has to provide details such as final state, diagnostics (in case of failures) etc. as specified in FinishApplicationMasterRequest.

The ResourceManager responds with FinishApplicationMasterResponse.

Parameters:
request - completion request
Returns:
completion response
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException

allocate

AllocateResponse allocate(AllocateRequest request)
                          throws org.apache.hadoop.yarn.exceptions.YarnRemoteException

The main interface between an ApplicationMaster and the ResourceManager.

The ApplicationMaster uses this interface to provide a list of ResourceRequest and returns unused Container allocated to it via AllocateRequest.

This also doubles up as a heartbeat to let the ResourceManager know that the ApplicationMaster is alive. Thus, applications should periodically make this call to be kept alive. The frequency depends on ??

The ResourceManager responds with list of allocated Container, status of completed containers and headroom information for the application.

The ApplicationMaster can use the available headroom (resources) to decide how to utilized allocated resources and make informed decisions about future resource requests.

Parameters:
request - allocation request
Returns:
allocation response
Throws:
org.apache.hadoop.yarn.exceptions.YarnRemoteException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.