Interface RMNode
- All Known Implementing Classes:
RMNodeImpl
public interface RMNode
Node managers information on available resources
and other static information.
-
Method Summary
Modifier and TypeMethodDescriptionlongcalculateHeartBeatInterval(long defaultInterval, long minInterval, long maxInterval, float speedupFactor, float slowdownFactor) org.apache.hadoop.yarn.api.records.ResourceUtilizationthe aggregated resource utilization of the containers.Set<org.apache.hadoop.yarn.api.records.NodeAttribute>default org.apache.hadoop.yarn.api.records.ResourceThe total allocated resources to containers.Get the allocation tags and their counts associated with this node.List<org.apache.hadoop.yarn.api.records.ApplicationId>intthe command port for this nodeList<org.apache.hadoop.yarn.api.records.ContainerId>the latest health report received from this node.the hostname of this nodethe http-Address for this node.intthe http port for this nodelongthe time of the latest health report received from this node.org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponseorg.apache.hadoop.net.NodegetNode()theNodeinformation for this node.the ContainerManager address for this node.org.apache.hadoop.yarn.api.records.NodeIdthe node id of of this node.Get set of labels in this nodethe node manager version of the node received as part of the registration with the resource manager.org.apache.hadoop.yarn.api.records.ResourceUtilizationthe total resource utilization of the node.org.apache.hadoop.yarn.server.api.records.OpportunisticContainersStatusorg.apache.hadoop.yarn.api.records.Resourcethe physical resources in the node.The rack name for this node manager.List<org.apache.hadoop.yarn.api.records.ApplicationId>org.apache.hadoop.yarn.api.records.NodeStategetState()org.apache.hadoop.yarn.api.records.Resourcethe total available resource.longbooleanIf the total available resources has been updated.Get and clear the list of containerUpdates accumulated across NM heartbeats.List<org.apache.hadoop.yarn.api.records.Container>voidReset lastNodeHeartbeatResponse's ID to 0.voidMark that the updated event has been processed.voidsetAndUpdateNodeHeartbeatResponse(org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse response) Update aNodeHeartbeatResponsewith the list of containers and applications to clean up for this node, and the containers to be updated.voidsetUntrackedTimeStamp(long timeStamp)
-
Method Details
-
getNodeID
org.apache.hadoop.yarn.api.records.NodeId getNodeID()the node id of of this node.- Returns:
- the node id of this node.
-
getHostName
String getHostName()the hostname of this node- Returns:
- hostname of this node
-
getCommandPort
int getCommandPort()the command port for this node- Returns:
- command port for this node
-
getHttpPort
int getHttpPort()the http port for this node- Returns:
- http port for this node
-
getNodeAddress
String getNodeAddress()the ContainerManager address for this node.- Returns:
- the ContainerManager address for this node.
-
getHttpAddress
String getHttpAddress()the http-Address for this node.- Returns:
- the http-url address for this node
-
getHealthReport
String getHealthReport()the latest health report received from this node.- Returns:
- the latest health report received from this node.
-
getLastHealthReportTime
long getLastHealthReportTime()the time of the latest health report received from this node.- Returns:
- the time of the latest health report received from this node.
-
getNodeManagerVersion
String getNodeManagerVersion()the node manager version of the node received as part of the registration with the resource manager.- Returns:
- node manager version.
-
getTotalCapability
org.apache.hadoop.yarn.api.records.Resource getTotalCapability()the total available resource.- Returns:
- the total available resource.
-
getAllocatedContainerResource
default org.apache.hadoop.yarn.api.records.Resource getAllocatedContainerResource()The total allocated resources to containers. This will include the sum of Guaranteed and Opportunistic containers queued + running + paused on the node.- Returns:
- the total allocated resources, including all Guaranteed and Opportunistic containers in queued, running and paused states.
-
isUpdatedCapability
boolean isUpdatedCapability()If the total available resources has been updated.- Returns:
- If the capability has been updated.
-
resetUpdatedCapability
void resetUpdatedCapability()Mark that the updated event has been processed. -
getAggregatedContainersUtilization
org.apache.hadoop.yarn.api.records.ResourceUtilization getAggregatedContainersUtilization()the aggregated resource utilization of the containers.- Returns:
- the aggregated resource utilization of the containers.
-
getNodeUtilization
org.apache.hadoop.yarn.api.records.ResourceUtilization getNodeUtilization()the total resource utilization of the node.- Returns:
- the total resource utilization of the node.
-
getPhysicalResource
org.apache.hadoop.yarn.api.records.Resource getPhysicalResource()the physical resources in the node.- Returns:
- the physical resources in the node.
-
getRackName
String getRackName()The rack name for this node manager.- Returns:
- the rack name.
-
getNode
org.apache.hadoop.net.Node getNode()theNodeinformation for this node.- Returns:
Nodeinformation for this node.
-
getState
org.apache.hadoop.yarn.api.records.NodeState getState() -
getContainersToCleanUp
List<org.apache.hadoop.yarn.api.records.ContainerId> getContainersToCleanUp() -
getAppsToCleanup
List<org.apache.hadoop.yarn.api.records.ApplicationId> getAppsToCleanup() -
getRunningApps
List<org.apache.hadoop.yarn.api.records.ApplicationId> getRunningApps() -
setAndUpdateNodeHeartbeatResponse
void setAndUpdateNodeHeartbeatResponse(org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse response) Update aNodeHeartbeatResponsewith the list of containers and applications to clean up for this node, and the containers to be updated.- Parameters:
response- theNodeHeartbeatResponseto update
-
getLastNodeHeartBeatResponse
org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse getLastNodeHeartBeatResponse() -
resetLastNodeHeartBeatResponse
void resetLastNodeHeartBeatResponse()Reset lastNodeHeartbeatResponse's ID to 0. -
pullContainerUpdates
List<UpdatedContainerInfo> pullContainerUpdates()Get and clear the list of containerUpdates accumulated across NM heartbeats.- Returns:
- containerUpdates accumulated across NM heartbeats.
-
getNodeLabels
Get set of labels in this node- Returns:
- labels in this node
-
pullNewlyIncreasedContainers
List<org.apache.hadoop.yarn.api.records.Container> pullNewlyIncreasedContainers() -
getOpportunisticContainersStatus
org.apache.hadoop.yarn.server.api.records.OpportunisticContainersStatus getOpportunisticContainersStatus() -
getUntrackedTimeStamp
long getUntrackedTimeStamp() -
setUntrackedTimeStamp
void setUntrackedTimeStamp(long timeStamp) -
getDecommissioningTimeout
Integer getDecommissioningTimeout() -
getAllocationTagsWithCount
Get the allocation tags and their counts associated with this node.- Returns:
- a map of each allocation tag and its count.
-
getRMContext
RMContext getRMContext()- Returns:
- the RM context associated with this RM node.
-
getAllNodeAttributes
Set<org.apache.hadoop.yarn.api.records.NodeAttribute> getAllNodeAttributes()- Returns:
- all node attributes as a Set.
-
calculateHeartBeatInterval
long calculateHeartBeatInterval(long defaultInterval, long minInterval, long maxInterval, float speedupFactor, float slowdownFactor)
-