public abstract static class AMRMClientAsync.AbstractCallbackHandler extends Object implements AMRMClientAsync.CallbackHandler
The callback abstract class. The callback functions need to be implemented
by AMRMClientAsync users. The APIs are called when responses from
the ResourceManager are available.
| Constructor and Description |
|---|
AMRMClientAsync.AbstractCallbackHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract float |
getProgress() |
abstract void |
onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
Called when the ResourceManager responds to a heartbeat with allocated
containers.
|
abstract void |
onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
Called when the ResourceManager responds to a heartbeat with completed
containers.
|
abstract void |
onContainersUpdated(List<org.apache.hadoop.yarn.api.records.UpdatedContainer> containers)
Called when the ResourceManager responds to a heartbeat with containers
whose resource allocation has been changed.
|
abstract void |
onError(Throwable e)
Called when error comes from RM communications as well as from errors in
the callback itself from the app.
|
abstract void |
onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
Called when nodes tracked by the ResourceManager have changed in health,
availability etc.
|
abstract void |
onShutdownRequest()
Called when the ResourceManager wants the ApplicationMaster to shutdown
for being out of sync etc.
|
public AMRMClientAsync.AbstractCallbackHandler()
public abstract void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
onContainersCompleted in interface AMRMClientAsync.CallbackHandlerpublic abstract void onContainersAllocated(List<org.apache.hadoop.yarn.api.records.Container> containers)
onContainersAllocated in interface AMRMClientAsync.CallbackHandler@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void onContainersUpdated(List<org.apache.hadoop.yarn.api.records.UpdatedContainer> containers)
public abstract void onShutdownRequest()
onShutdownRequest in interface AMRMClientAsync.CallbackHandlerpublic abstract void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
onNodesUpdated in interface AMRMClientAsync.CallbackHandlerpublic abstract float getProgress()
getProgress in interface AMRMClientAsync.CallbackHandlerpublic abstract void onError(Throwable e)
onError in interface AMRMClientAsync.CallbackHandlerCopyright © 2022 Apache Software Foundation. All rights reserved.