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

Package org.apache.hadoop.yarn.api.records

# Class YarnClusterMetrics

java.lang.Object
org.apache.hadoop.yarn.api.records.YarnClusterMetrics

@Public @Stable public abstract class YarnClusterMetrics extends Object

`YarnClusterMetrics` represents cluster metrics.

Currently only number of `NodeManager`s is provided.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `YarnClusterMetrics()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract int`
  `getNumActiveNodeManagers()`
  Get the number of `ActiveNodeManager`s in the cluster.
  `abstract int`
  `getNumDecommissionedNodeManagers()`
  Get the number of `DecommissionedNodeManager`s in the cluster.
  `abstract int`
  `getNumDecommissioningNodeManagers()`
  Get the number of `DecommissioningNodeManager`s in the cluster.
  `abstract int`
  `getNumLostNodeManagers()`
  Get the number of `LostNodeManager`s in the cluster.
  `abstract int`
  `getNumNodeManagers()`
  Get the number of `NodeManager`s in the cluster.
  `abstract int`
  `getNumRebootedNodeManagers()`
  Get the number of `RebootedNodeManager`s in the cluster.
  `abstract int`
  `getNumShutdownNodeManagers()`
  Get the number of `ShutdownNodeManager`s in the cluster.
  `abstract int`
  `getNumUnhealthyNodeManagers()`
  Get the number of `UnhealthyNodeManager`s in the cluster.
  `static YarnClusterMetrics`
  `newInstance(int numNodeManagers)`
  `abstract void`
  `setNumActiveNodeManagers(int numActiveNodeManagers)`
  `abstract void`
  `setNumDecommissionedNodeManagers(int numDecommissionedNodeManagers)`
  `abstract void`
  `setNumDecommissioningNodeManagers(int numDecommissioningNodeManagers)`
  `abstract void`
  `setNumLostNodeManagers(int numLostNodeManagers)`
  `abstract void`
  `setNumNodeManagers(int numNodeManagers)`
  `abstract void`
  `setNumRebootedNodeManagers(int numRebootedNodeManagers)`
  `abstract void`
  `setNumShutdownNodeManagers(int numShutdownNodeManagers)`
  `abstract void`
  `setNumUnhealthyNodeManagers(int numUnhealthNodeManagers)`

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

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

- ## Constructor Details

  - ### YarnClusterMetrics

    public YarnClusterMetrics()

- ## Method Details

  - ### newInstance

    @Private @Unstable public static YarnClusterMetrics newInstance(int numNodeManagers)

  - ### getNumNodeManagers

    @Public @Stable public abstract int getNumNodeManagers()
    Get the number of `NodeManager`s in the cluster.
    Returns:
      number of `NodeManager`s in the cluster

  - ### setNumNodeManagers

    @Private @Unstable public abstract void setNumNodeManagers(int numNodeManagers)

  - ### getNumDecommissioningNodeManagers

    @Public @Unstable public abstract int getNumDecommissioningNodeManagers()
    Get the number of `DecommissioningNodeManager`s in the cluster.
    Returns:
      number of `DecommissioningNodeManager`s in the cluster

  - ### setNumDecommissioningNodeManagers

    @Private @Unstable public abstract void setNumDecommissioningNodeManagers(int numDecommissioningNodeManagers)

  - ### getNumDecommissionedNodeManagers

    @Public @Unstable public abstract int getNumDecommissionedNodeManagers()
    Get the number of `DecommissionedNodeManager`s in the cluster.
    Returns:
      number of `DecommissionedNodeManager`s in the cluster

  - ### setNumDecommissionedNodeManagers

    @Private @Unstable public abstract void setNumDecommissionedNodeManagers(int numDecommissionedNodeManagers)

  - ### getNumActiveNodeManagers

    @Public @Unstable public abstract int getNumActiveNodeManagers()
    Get the number of `ActiveNodeManager`s in the cluster.
    Returns:
      number of `ActiveNodeManager`s in the cluster

  - ### setNumActiveNodeManagers

    @Private @Unstable public abstract void setNumActiveNodeManagers(int numActiveNodeManagers)

  - ### getNumLostNodeManagers

    @Public @Unstable public abstract int getNumLostNodeManagers()
    Get the number of `LostNodeManager`s in the cluster.
    Returns:
      number of `LostNodeManager`s in the cluster

  - ### setNumLostNodeManagers

    @Private @Unstable public abstract void setNumLostNodeManagers(int numLostNodeManagers)

  - ### getNumUnhealthyNodeManagers

    @Public @Unstable public abstract int getNumUnhealthyNodeManagers()
    Get the number of `UnhealthyNodeManager`s in the cluster.
    Returns:
      number of `UnhealthyNodeManager`s in the cluster

  - ### setNumUnhealthyNodeManagers

    @Private @Unstable public abstract void setNumUnhealthyNodeManagers(int numUnhealthNodeManagers)

  - ### getNumRebootedNodeManagers

    @Public @Unstable public abstract int getNumRebootedNodeManagers()
    Get the number of `RebootedNodeManager`s in the cluster.
    Returns:
      number of `RebootedNodeManager`s in the cluster

  - ### setNumRebootedNodeManagers

    @Private @Unstable public abstract void setNumRebootedNodeManagers(int numRebootedNodeManagers)

  - ### getNumShutdownNodeManagers

    @Public @Unstable public abstract int getNumShutdownNodeManagers()
    Get the number of `ShutdownNodeManager`s in the cluster.
    Returns:
      number of `ShutdownNodeManager`s in the cluster

  - ### setNumShutdownNodeManagers

    @Private @Unstable public abstract void setNumShutdownNodeManagers(int numShutdownNodeManagers)