Interface NMClientAsync.CallbackHandler

All Known Implementing Classes:
NMClientAsync.AbstractCallbackHandler
Enclosing class:
NMClientAsync

@Deprecated public static interface NMClientAsync.CallbackHandler
Deprecated.
Use NMClientAsync.AbstractCallbackHandler instead.

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

    Modifier and Type
    Method
    Description
    void
    onContainerStarted(org.apache.hadoop.yarn.api.records.ContainerId containerId, Map<String,ByteBuffer> allServiceResponse)
    Deprecated.
    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)
    Deprecated.
    The API is called when NodeManager responds with the status of the container
    void
    onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
    Deprecated.
    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)
    Deprecated.
    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)
    Deprecated.
    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)
    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 when NodeManager responds to indicate its acceptance of the starting container request
      Parameters:
      containerId - the Id of the container
      allServiceResponse - 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 when NodeManager responds with the status of the container
      Parameters:
      containerId - the Id of the container
      containerStatus - the status of the container
    • onContainerStopped

      void onContainerStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
      Deprecated.
      The API is called when NodeManager responds to indicate the container is stopped.
      Parameters:
      containerId - the Id of the container
    • onStartContainerError

      void onStartContainerError(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 container
      Parameters:
      containerId - the Id of the container
      t - 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 container
      t - the raised exception
    • onStopContainerError

      void onStopContainerError(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
      Parameters:
      containerId - the Id of the container
      t - the raised exception