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 |
---|
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.
|
void |
onContainersReceivedFromPreviousAttempts(List<org.apache.hadoop.yarn.api.records.Container> containers)
Called when the ResourceManager responds to a heartbeat with containers
from previous attempt.
|
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.
|
void |
onRequestsRejected(List<org.apache.hadoop.yarn.api.records.RejectedSchedulingRequest> rejectedSchedulingRequests)
Called when the RM has rejected Scheduling Requests.
|
abstract void |
onShutdownRequest()
Called when the ResourceManager wants the ApplicationMaster to shutdown
for being out of sync etc.
|
public abstract void onContainersCompleted(List<org.apache.hadoop.yarn.api.records.ContainerStatus> statuses)
onContainersCompleted
in interface AMRMClientAsync.CallbackHandler
public 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.CallbackHandler
public abstract void onNodesUpdated(List<org.apache.hadoop.yarn.api.records.NodeReport> updatedNodes)
onNodesUpdated
in interface AMRMClientAsync.CallbackHandler
public abstract float getProgress()
getProgress
in interface AMRMClientAsync.CallbackHandler
public abstract void onError(Throwable e)
onError
in interface AMRMClientAsync.CallbackHandler
public void onContainersReceivedFromPreviousAttempts(List<org.apache.hadoop.yarn.api.records.Container> containers)
@InterfaceAudience.Public @InterfaceStability.Unstable public void onRequestsRejected(List<org.apache.hadoop.yarn.api.records.RejectedSchedulingRequest> rejectedSchedulingRequests)
rejectedSchedulingRequests
- Rejected Scheduling Requests.Copyright © 2008–2018 Apache Software Foundation. All rights reserved.