Interface NMClientAsync.CallbackHandler
- All Known Implementing Classes:
NMClientAsync.AbstractCallbackHandler
- Enclosing class:
- NMClientAsync
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId, Map<String, ByteBuffer> allServiceResponse) Deprecated.The API is called whenNodeManagerresponds to indicate its acceptance of the starting container requestvoidonContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) Deprecated.The API is called whenNodeManagerresponds with the status of the containervoidonContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) Deprecated.The API is called whenNodeManagerresponds to indicate the container is stopped.voidonGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t) Deprecated.The API is called when an exception is raised in the process of querying the status of a containervoidonStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t) Deprecated.The API is called when an exception is raised in the process of starting a containervoidonStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t) Deprecated.The API is called when an exception is raised in the process of stopping a container
-
Method Details
-
onContainerStarted
void onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId, Map<String, ByteBuffer> allServiceResponse) Deprecated.The API is called whenNodeManagerresponds to indicate its acceptance of the starting container request- Parameters:
containerId- the Id of the containerallServiceResponse- a Map between the auxiliary service names and their outputs
-
onContainerStatusReceived
void onContainerStatusReceived(org.apache.hadoop.yarn.api.records.ContainerId containerId, org.apache.hadoop.yarn.api.records.ContainerStatus containerStatus) Deprecated.The API is called whenNodeManagerresponds with the status of the container- Parameters:
containerId- the Id of the containercontainerStatus- the status of the container
-
onContainerStopped
void onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) Deprecated.The API is called whenNodeManagerresponds to indicate the container is stopped.- Parameters:
containerId- the Id of the container
-
onStartContainerError
Deprecated.The API is called when an exception is raised in the process of starting a container- Parameters:
containerId- the Id of the containert- the raised exception
-
onGetContainerStatusError
void onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t) Deprecated.The API is called when an exception is raised in the process of querying the status of a container- Parameters:
containerId- the Id of the containert- the raised exception
-
onStopContainerError
Deprecated.The API is called when an exception is raised in the process of stopping a container- Parameters:
containerId- the Id of the containert- the raised exception
-
NMClientAsync.AbstractCallbackHandlerinstead.The callback interface needs to be implemented by
NMClientAsyncusers. The APIs are called when responses fromNodeManagerare 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 function should not throw the unexpected exception. Otherwise,
NMClientAsyncwill just catch, log and then ignore it.