org.apache.hadoop.yarn.client.api.async
Interface AMRMClientAsync.CallbackHandler

Enclosing class:
AMRMClientAsync<T extends AMRMClient.ContainerRequest>

public static interface AMRMClientAsync.CallbackHandler


Method Summary
 float getProgress()
           
 void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
          Called when the ResourceManager responds to a heartbeat with allocated containers.
 void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
          Called when the ResourceManager responds to a heartbeat with completed containers.
 void onError(Throwable e)
          Called when error comes from RM communications as well as from errors in the callback itself from the app.
 void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
          Called when nodes tracked by the ResourceManager have changed in health, availability etc.
 void onShutdownRequest()
          Called when the ResourceManager wants the ApplicationMaster to shutdown for being out of sync etc.
 

Method Detail

onContainersCompleted

void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
Called when the ResourceManager responds to a heartbeat with completed containers. If the response contains both completed containers and allocated containers, this will be called before containersAllocated.


onContainersAllocated

void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
Called when the ResourceManager responds to a heartbeat with allocated containers. If the response containers both completed containers and allocated containers, this will be called after containersCompleted.


onShutdownRequest

void onShutdownRequest()
Called when the ResourceManager wants the ApplicationMaster to shutdown for being out of sync etc. The ApplicationMaster should not unregister with the RM unless the ApplicationMaster wants to be the last attempt.


onNodesUpdated

void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
Called when nodes tracked by the ResourceManager have changed in health, availability etc.


getProgress

float getProgress()

onError

void onError(Throwable e)
Called when error comes from RM communications as well as from errors in the callback itself from the app. Calling stop() is the recommended action.

Parameters:
e -


Copyright © 2014 Apache Software Foundation. All Rights Reserved.