All Known Implementing Classes:
RMNodeImpl

public interface RMNode
Node managers information on available resources and other static information.
  • 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()
      the Node information for this node.
      Returns:
      Node information 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 a NodeHeartbeatResponse with the list of containers and applications to clean up for this node, and the containers to be updated.
      Parameters:
      response - the NodeHeartbeatResponse to 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

      Set<String> 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

      Map<String,Long> 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)