StartContainersResponse (Apache Hadoop YARN API 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.protocolrecords, class: StartContainersResponse

Package org.apache.hadoop.yarn.api.protocolrecords

# Class StartContainersResponse

java.lang.Object
org.apache.hadoop.yarn.api.protocolrecords.StartContainersResponse

@Public @Stable public abstract class StartContainersResponse extends Object

The response sent by the `NodeManager` to the `ApplicationMaster` when asked to start an allocated container.

See Also:
  - `ContainerManagementProtocol.startContainers(StartContainersRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StartContainersResponse()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract Map<String,ByteBuffer>`
  `getAllServicesMetaData()`
  Get the meta-data from all auxiliary services running on the `NodeManager`.
  `abstract Map<ContainerId,SerializedException>`
  `getFailedRequests()`
  Get the containerId-to-exception map in which the exception indicates error from per container for failed requests
  `abstract List<ContainerId>`
  `getSuccessfullyStartedContainers()`
  Get the list of `ContainerId` s of the containers that are started successfully.
  `static StartContainersResponse`
  `newInstance(Map<String,ByteBuffer> servicesMetaData, List<ContainerId> succeededContainers, Map<ContainerId,SerializedException> failedContainers)`
  `abstract void`
  `setAllServicesMetaData(Map<String,ByteBuffer> allServicesMetaData)`
  Set to the list of auxiliary services which have been started on the `NodeManager`.
  `abstract void`
  `setFailedRequests(Map<ContainerId,SerializedException> failedContainers)`
  Set the containerId-to-exception map in which the exception indicates error from per container for failed requests.
  `abstract void`
  `setSuccessfullyStartedContainers(List<ContainerId> succeededContainers)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StartContainersResponse

    public StartContainersResponse()

- ## Method Details

  - ### newInstance

    @Private @Unstable public static StartContainersResponse newInstance(Map<String,ByteBuffer> servicesMetaData, List<ContainerId> succeededContainers, Map<ContainerId,SerializedException> failedContainers)

  - ### getSuccessfullyStartedContainers

    @Public @Stable public abstract List<ContainerId> getSuccessfullyStartedContainers()
    Get the list of `ContainerId` s of the containers that are started successfully.
    Returns:
      the list of `ContainerId` s of the containers that are started successfully.
    See Also:
      - `ContainerManagementProtocol.startContainers(StartContainersRequest)`

  - ### setSuccessfullyStartedContainers

    @Private @Unstable public abstract void setSuccessfullyStartedContainers(List<ContainerId> succeededContainers)

  - ### getFailedRequests

    @Public @Stable public abstract Map<ContainerId,SerializedException> getFailedRequests()
    Get the containerId-to-exception map in which the exception indicates error from per container for failed requests
    Returns:
      map of containerId-to-exception

  - ### setFailedRequests

    @Private @Unstable public abstract void setFailedRequests(Map<ContainerId,SerializedException> failedContainers)
    Set the containerId-to-exception map in which the exception indicates error from per container for failed requests.
    Parameters:
      `failedContainers` - container for failed requests.

  - ### getAllServicesMetaData

    @Public @Stable public abstract Map<String,ByteBuffer> getAllServicesMetaData()

    Get the meta-data from all auxiliary services running on the `NodeManager`.

    The meta-data is returned as a Map between the auxiliary service names and their corresponding per service meta-data as an opaque blob `ByteBuffer`

    To be able to interpret the per-service meta-data, you should consult the documentation for the Auxiliary-service configured on the NodeManager

    Returns:
      a Map between the names of auxiliary services and their corresponding meta-data

  - ### setAllServicesMetaData

    @Private @Unstable public abstract void setAllServicesMetaData(Map<String,ByteBuffer> allServicesMetaData)
    Set to the list of auxiliary services which have been started on the `NodeManager`. This is done only once when the `NodeManager` starts up
    Parameters:
      `allServicesMetaData` - A map from auxiliary service names to the opaque blob `ByteBuffer` for that auxiliary service