Class NodeReport
java.lang.Object
org.apache.hadoop.yarn.api.records.NodeReport
NodeReport is a summary of runtime information of a node
in the cluster.
It includes details such as:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet containers aggregated resource utilization in a node.abstract ResourceGet the totalResourceon the node.Optional decommissioning timeout in seconds (null indicates absent timeout).abstract StringGet the diagnostic health report of the node.abstract StringGet the http address of the node.abstract longGet the last timestamp at which the health report was received.abstract Set<NodeAttribute>Get node attributes of node.abstract NodeIdGet theNodeIdof the node.Get labels of this node.abstract NodeStateGet theNodeStateof the node.Optional node update type (null indicates absent update type).abstract ResourceUtilizationGet node resource utilization.abstract intgetNumContainers()Get the number of allocated containers on the node.abstract StringGet the rack name for the node.abstract ResourcegetUsed()Get usedResourceon the node.static NodeReportnewInstance(NodeId nodeId, NodeState nodeState, String httpAddress, String rackName, Resource used, Resource capability, int numContainers, String healthReport, long lastHealthReportTime) static NodeReportnewInstance(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) voidsetAggregatedContainersUtilization(ResourceUtilization containersUtilization) abstract voidsetCapability(Resource capability) voidsetDecommissioningTimeout(Integer decommissioningTimeout) Set the decommissioning timeout in seconds (null indicates absent timeout).abstract voidsetHealthReport(String healthReport) abstract voidsetHttpAddress(String httpAddress) abstract voidsetLastHealthReportTime(long lastHealthReport) abstract voidsetNodeAttributes(Set<NodeAttribute> nodeAttributes) Set the node attributes of node.abstract voidsetNodeId(NodeId nodeId) abstract voidabstract voidsetNodeState(NodeState nodeState) voidsetNodeUpdateType(NodeUpdateType nodeUpdateType) Set the node update type (null indicates absent node update type).abstract voidsetNodeUtilization(ResourceUtilization nodeUtilization) abstract voidsetNumContainers(int numContainers) abstract voidsetRackName(String rackName) abstract voidsetUsed(Resource used)
-
Constructor Details
-
NodeReport
public NodeReport()
-
-
Method Details
-
newInstance
-
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
Get theNodeIdof the node.- Returns:
NodeIdof the node
-
setNodeId
-
getNodeState
Get theNodeStateof the node.- Returns:
NodeStateof the node
-
setNodeState
-
getHttpAddress
Get the http address of the node.- Returns:
- http address of the node
-
setHttpAddress
-
getRackName
Get the rack name for the node.- Returns:
- rack name for the node
-
setRackName
-
getUsed
Get usedResourceon the node.- Returns:
- used
Resourceon the node
-
setUsed
-
getCapability
Get the totalResourceon the node.- Returns:
- total
Resourceon the node
-
setCapability
-
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
Get the diagnostic health report of the node.- Returns:
- diagnostic health report of the node
-
setHealthReport
-
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
Get labels of this node.- Returns:
- labels of this node.
-
setNodeLabels
-
getAggregatedContainersUtilization
Get containers aggregated resource utilization in a node.- Returns:
- containers resource utilization.
-
setAggregatedContainersUtilization
@Private @Unstable public void setAggregatedContainersUtilization(ResourceUtilization containersUtilization) -
getNodeUtilization
Get node resource utilization.- Returns:
- node resource utilization.
-
setNodeUtilization
-
getDecommissioningTimeout
Optional decommissioning timeout in seconds (null indicates absent timeout).- Returns:
- the decommissioning timeout in second.
-
setDecommissioningTimeout
Set the decommissioning timeout in seconds (null indicates absent timeout).- Parameters:
decommissioningTimeout- decommissioning time out.
-
getNodeUpdateType
Optional node update type (null indicates absent update type).- Returns:
- the node update.
-
setNodeUpdateType
Set the node update type (null indicates absent node update type).- Parameters:
nodeUpdateType- node update type.
-
setNodeAttributes
Set the node attributes of node.- Parameters:
nodeAttributes- set of node attributes.
-
getNodeAttributes
Get node attributes of node.- Returns:
- the set of node attributes.
-