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

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

# Class GetContainersResponse

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

@Public @Unstable public abstract class GetContainersResponse extends Object

The response sent by the `ResourceManager` to a client requesting a list of `ContainerReport` for containers.

The `ContainerReport` for each container includes the container details.

See Also:
  - `ContainerReport`
  - `ApplicationBaseProtocol.getContainers(GetContainersRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetContainersResponse()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract List<ContainerReport>`
  `getContainerList()`
  Get a list of `ContainerReport` for all the containers of an application attempt.
  `static GetContainersResponse`
  `newInstance(List<ContainerReport> containers)`
  `abstract void`
  `setContainerList(List<ContainerReport> containers)`
  Set a list of `ContainerReport` for all the containers of an application attempt.

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

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

- ## Constructor Details

  - ### GetContainersResponse

    public GetContainersResponse()

- ## Method Details

  - ### newInstance

    @Public @Unstable public static GetContainersResponse newInstance(List<ContainerReport> containers)

  - ### getContainerList

    @Public @Unstable public abstract List<ContainerReport> getContainerList()
    Get a list of `ContainerReport` for all the containers of an application attempt.
    Returns:
      a list of `ContainerReport` for all the containers of an application attempt

  - ### setContainerList

    @Public @Unstable public abstract void setContainerList(List<ContainerReport> containers)
    Set a list of `ContainerReport` for all the containers of an application attempt.
    Parameters:
      `containers` - a list of `ContainerReport` for all the containers of an application attempt