|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface NMClientAsync.CallbackHandler
The callback interface needs 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 function should not throw the
unexpected exception. Otherwise, NMClientAsync
will just
catch, log and then ignore it.
Method Summary | |
---|---|
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 |
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 |
void |
onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
The API is called when NodeManager responds to indicate the
container is stopped. |
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 |
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 |
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 |
Method Detail |
---|
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
containerId
- the Id of the containerallServiceResponse
- a Map between the auxiliary service names and
their outputsvoid 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
containerId
- the Id of the containercontainerStatus
- the status of the containervoid onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeManager
responds to indicate the
container is stopped.
containerId
- the Id of the containervoid onStartContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the containert
- the raised exceptionvoid onGetContainerStatusError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the containert
- the raised exceptionvoid onStopContainerError(org.apache.hadoop.yarn.api.records.ContainerId containerId, Throwable t)
containerId
- the Id of the containert
- the raised exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |