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

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

# Class GetClusterNodesRequest

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

@Public @Stable public abstract class GetClusterNodesRequest extends Object

The request from clients to get a report of all nodes in the cluster from the `ResourceManager`.

The request will ask for all nodes in the given `NodeState`s.

See Also:
  - `ApplicationClientProtocol.getClusterNodes(GetClusterNodesRequest)`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GetClusterNodesRequest()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract EnumSet<NodeState>`
  `getNodeStates()`
  The state to filter the cluster nodes with.
  `static GetClusterNodesRequest`
  `newInstance()`
  `static GetClusterNodesRequest`
  `newInstance(EnumSet<NodeState> states)`
  `abstract void`
  `setNodeStates(EnumSet<NodeState> states)`
  The state to filter the cluster nodes with.

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

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

- ## Constructor Details

  - ### GetClusterNodesRequest

    public GetClusterNodesRequest()

- ## Method Details

  - ### newInstance

    @Public @Stable public static GetClusterNodesRequest newInstance(EnumSet<NodeState> states)

  - ### newInstance

    @Public @Stable public static GetClusterNodesRequest newInstance()

  - ### getNodeStates

    public abstract EnumSet<NodeState> getNodeStates()
    The state to filter the cluster nodes with.
    Returns:
      the set of `NodeState`

  - ### setNodeStates

    public abstract void setNodeStates(EnumSet<NodeState> states)
    The state to filter the cluster nodes with.
    Parameters:
      `states` - the set of `NodeState`