public abstract static class NMClientAsync.AbstractCallbackHandler extends Object implements NMClientAsync.CallbackHandler
The callback abstract class. The callback functions need to be implemented
by NMClientAsync
users. The APIs are called when responses from
NodeManager
are available.
Once a callback happens, the users can chose to act on it in blocking or non-blocking manner. If the action on callback is done in a blocking manner, some of the threads performing requests on NodeManagers may get blocked depending on how many threads in the pool are busy.
The implementation of the callback functions should not throw the
unexpected exception. Otherwise, NMClientAsync
will just
catch, log and then ignore it.
Constructor and Description |
---|
AbstractCallbackHandler() |
Modifier and Type | Method and Description |
---|---|
void |
onCommitLastReInitialization(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Callback for commit of last re-initialization.
|
void |
onCommitLastReInitializationError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
Error Callback for commit of last re-initialization.
|
void |
onContainerReInitialize(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Callback for container re-initialization request.
|
void |
onContainerReInitializeError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
Error Callback for container re-initialization request.
|
abstract void |
onContainerResourceIncreased(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.Resource resource)
Deprecated.
|
abstract void |
onContainerResourceUpdated(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.Resource resource)
The API is called when
NodeManager responds to indicate
the container resource has been successfully updated. |
void |
onContainerRestart(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Callback for container restart.
|
void |
onContainerRestartError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
Error Callback for container restart.
|
abstract void |
onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Map<String,ByteBuffer> allServiceResponse)
The API is called when
NodeManager responds to indicate its
acceptance of the starting container request. |
abstract void |
onContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId,
org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
The API is called when
NodeManager responds with the status
of the container. |
abstract void |
onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
The API is called when
NodeManager responds to indicate the
container is stopped. |
abstract void |
onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
The API is called when an exception is raised in the process of
querying the status of a container.
|
abstract void |
onIncreaseContainerResourceError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
Deprecated.
|
void |
onRollbackLastReInitialization(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Callback for rollback of last re-initialization.
|
void |
onRollbackLastReInitializationError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
Error Callback for rollback of last re-initialization.
|
abstract void |
onStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
The API is called when an exception is raised in the process of
starting a container.
|
abstract void |
onStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
The API is called when an exception is raised in the process of
stopping a container.
|
abstract void |
onUpdateContainerResourceError(org.apache.hadoop.yarn.api.records.ContainerId containerId,
Throwable t)
The API is called when an exception is raised in the process of
updating container resource.
|
public abstract void onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId, Map<String,ByteBuffer> allServiceResponse)
NodeManager
responds to indicate its
acceptance of the starting container request.onContainerStarted
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containerallServiceResponse
- a Map between the auxiliary service names and
their outputspublic abstract void onContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus)
NodeManager
responds with the status
of the container.onContainerStatusReceived
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containercontainerStatus
- the status of the containerpublic abstract void onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeManager
responds to indicate the
container is stopped.onContainerStopped
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containerpublic abstract void onStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
onStartContainerError
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containert
- the raised exception@Deprecated public abstract void onContainerResourceIncreased(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource)
NodeManager
responds to indicate
the container resource has been successfully increased.containerId
- the Id of the containerresource
- the target resource of the containerpublic abstract void onContainerResourceUpdated(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.Resource resource)
NodeManager
responds to indicate
the container resource has been successfully updated.containerId
- the Id of the containerresource
- the target resource of the containerpublic abstract void onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
onGetContainerStatusError
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containert
- the raised exception@Deprecated public abstract void onIncreaseContainerResourceError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the containert
- the raised exceptionpublic abstract void onUpdateContainerResourceError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the containert
- the raised exceptionpublic abstract void onStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
onStopContainerError
in interface NMClientAsync.CallbackHandler
containerId
- the Id of the containert
- the raised exceptionpublic void onContainerReInitialize(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId
- the Id of the container to be Re-Initialized.public void onContainerRestart(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId
- the Id of the container to restart.public void onRollbackLastReInitialization(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId
- the Id of the container to restart.public void onCommitLastReInitialization(org.apache.hadoop.yarn.api.records.ContainerId containerId)
containerId
- the Id of the container to commit reInitialize.public void onContainerReInitializeError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the container to be Re-Initialized.t
- a Throwable.public void onContainerRestartError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the container to restart.t
- a Throwable.public void onRollbackLastReInitializationError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the container to restart.t
- a Throwable.public void onCommitLastReInitializationError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the container to commit reInitialize.t
- a Throwable.Copyright © 2008–2018 Apache Software Foundation. All rights reserved.