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

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

# Class StopContainersResponse

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

@Public @Stable public abstract class StopContainersResponse extends Object

The response sent by the `NodeManager` to the `ApplicationMaster` when asked to stop allocated containers.

See Also:
  - `ContainerManagementProtocol.stopContainers(StopContainersRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StopContainersResponse()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract Map<ContainerId,org.apache.hadoop.yarn.api.records.SerializedException>`
  `getFailedRequests()`
  Get the containerId-to-exception map in which the exception indicates error from per container for failed requests.
  `abstract List<ContainerId>`
  `getSuccessfullyStoppedContainers()`
  Get the list of containerIds of successfully stopped containers.
  `static StopContainersResponse`
  `newInstance(List<ContainerId> succeededRequests, Map<ContainerId,org.apache.hadoop.yarn.api.records.SerializedException> failedRequests)`
  `abstract void`
  `setFailedRequests(Map<ContainerId,org.apache.hadoop.yarn.api.records.SerializedException> failedRequests)`
  Set the containerId-to-exception map in which the exception indicates error from per container for failed requests.
  `abstract void`
  `setSuccessfullyStoppedContainers(List<ContainerId> succeededRequests)`
  Set the list of containerIds of successfully stopped containers.

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

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

- ## Constructor Details

  - ### StopContainersResponse

    public StopContainersResponse()

- ## Method Details

  - ### newInstance

    @Private @Unstable public static StopContainersResponse newInstance(List<ContainerId> succeededRequests, Map<ContainerId,org.apache.hadoop.yarn.api.records.SerializedException> failedRequests)

  - ### getSuccessfullyStoppedContainers

    @Public @Stable public abstract List<ContainerId> getSuccessfullyStoppedContainers()
    Get the list of containerIds of successfully stopped containers.
    Returns:
      the list of containerIds of successfully stopped containers.

  - ### setSuccessfullyStoppedContainers

    @Private @Unstable public abstract void setSuccessfullyStoppedContainers(List<ContainerId> succeededRequests)
    Set the list of containerIds of successfully stopped containers.
    Parameters:
      `succeededRequests` - the list of containerIds of successfully stopped containers.

  - ### getFailedRequests

    @Public @Stable public abstract Map<ContainerId,org.apache.hadoop.yarn.api.records.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,org.apache.hadoop.yarn.api.records.SerializedException> failedRequests)
    Set the containerId-to-exception map in which the exception indicates error from per container for failed requests.
    Parameters:
      `failedRequests` - map of containerId-to-exception.