Class NodeReport

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

@Public @Stable public abstract class NodeReport extends Object
NodeReport is a summary of runtime information of a node in the cluster.

It includes details such as:

  • NodeId of the node.
  • HTTP Tracking URL of the node.
  • Rack name for the node.
  • Used Resource on the node.
  • Total available Resource of the node.
  • Number of running containers on the node.
See Also:
  • Constructor Details

    • NodeReport

      public NodeReport()
  • Method Details

    • newInstance

      @Private @Unstable public static NodeReport newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime)
    • newInstance

      @Private @Unstable public static NodeReport newInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime, Set<String> nodeLabels, Integer decommissioningTimeout, NodeUpdateType nodeUpdateType)
    • getNodeId

      @Public @Stable public abstract NodeId getNodeId()
      Get the NodeId of the node.
      Returns:
      NodeId of the node
    • setNodeId

      @Private @Unstable public abstract void setNodeId(NodeId nodeId)
    • getNodeState

      @Public @Stable public abstract NodeState getNodeState()
      Get the NodeState of the node.
      Returns:
      NodeState of the node
    • setNodeState

      @Private @Unstable public abstract void setNodeState(NodeState nodeState)
    • getHttpAddress

      @Public @Stable public abstract String getHttpAddress()
      Get the http address of the node.
      Returns:
      http address of the node
    • setHttpAddress

      @Private @Unstable public abstract void setHttpAddress(String httpAddress)
    • getRackName

      @Public @Stable public abstract String getRackName()
      Get the rack name for the node.
      Returns:
      rack name for the node
    • setRackName

      @Private @Unstable public abstract void setRackName(String rackName)
    • getUsed

      @Public @Stable public abstract Resource getUsed()
      Get used Resource on the node.
      Returns:
      used Resource on the node
    • setUsed

      @Private @Unstable public abstract void setUsed(Resource used)
    • getCapability

      @Public @Stable public abstract Resource getCapability()
      Get the total Resource on the node.
      Returns:
      total Resource on the node
    • setCapability

      @Private @Unstable public abstract void setCapability(Resource capability)
    • getNumContainers

      @Private @Unstable public abstract int getNumContainers()
      Get the number of allocated containers on the node.
      Returns:
      number of allocated containers on the node
    • setNumContainers

      @Private @Unstable public abstract void setNumContainers(int numContainers)
    • getHealthReport

      @Public @Stable public abstract String getHealthReport()
      Get the diagnostic health report of the node.
      Returns:
      diagnostic health report of the node
    • setHealthReport

      @Private @Unstable public abstract void setHealthReport(String healthReport)
    • getLastHealthReportTime

      @Public @Stable public abstract long getLastHealthReportTime()
      Get the last timestamp at which the health report was received.
      Returns:
      last timestamp at which the health report was received
    • setLastHealthReportTime

      @Private @Unstable public abstract void setLastHealthReportTime(long lastHealthReport)
    • getNodeLabels

      @Public @Stable public abstract Set<String> getNodeLabels()
      Get labels of this node.
      Returns:
      labels of this node.
    • setNodeLabels

      @Private @Unstable public abstract void setNodeLabels(Set<String> nodeLabels)
    • getAggregatedContainersUtilization

      @Public @Stable public ResourceUtilization getAggregatedContainersUtilization()
      Get containers aggregated resource utilization in a node.
      Returns:
      containers resource utilization.
    • setAggregatedContainersUtilization

      @Private @Unstable public void setAggregatedContainersUtilization(ResourceUtilization containersUtilization)
    • getNodeUtilization

      @Public @Stable public abstract ResourceUtilization getNodeUtilization()
      Get node resource utilization.
      Returns:
      node resource utilization.
    • setNodeUtilization

      @Private @Unstable public abstract void setNodeUtilization(ResourceUtilization nodeUtilization)
    • getDecommissioningTimeout

      public Integer getDecommissioningTimeout()
      Optional decommissioning timeout in seconds (null indicates absent timeout).
      Returns:
      the decommissioning timeout in second.
    • setDecommissioningTimeout

      public void setDecommissioningTimeout(Integer decommissioningTimeout)
      Set the decommissioning timeout in seconds (null indicates absent timeout).
      Parameters:
      decommissioningTimeout - decommissioning time out.
    • getNodeUpdateType

      public NodeUpdateType getNodeUpdateType()
      Optional node update type (null indicates absent update type).
      Returns:
      the node update.
    • setNodeUpdateType

      public void setNodeUpdateType(NodeUpdateType nodeUpdateType)
      Set the node update type (null indicates absent node update type).
      Parameters:
      nodeUpdateType - node update type.
    • setNodeAttributes

      public abstract void setNodeAttributes(Set<NodeAttribute> nodeAttributes)
      Set the node attributes of node.
      Parameters:
      nodeAttributes - set of node attributes.
    • getNodeAttributes

      public abstract Set<NodeAttribute> getNodeAttributes()
      Get node attributes of node.
      Returns:
      the set of node attributes.