Class DecommissioningNodesWatcher

java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.DecommissioningNodesWatcher

public class DecommissioningNodesWatcher extends Object
DecommissioningNodesWatcher is used by ResourceTrackerService to track DECOMMISSIONING nodes to decide when, after all running containers on the node have completed, will be transitioned into DECOMMISSIONED state (NodeManager will be told to shutdown). Under MR application, a node, after completes all its containers, may still serve it map output data during the duration of the application for reducers. A fully graceful mechanism would keep such DECOMMISSIONING nodes until all involved applications complete. It could be however undesirable under long-running applications scenario where a bunch of "idle" nodes would stay around for long period of time. DecommissioningNodesWatcher balance such concern with a timeout policy --- a DECOMMISSIONING node will be DECOMMISSIONED no later than DECOMMISSIONING_TIMEOUT regardless of running containers or applications. DecommissioningNodesWatcher basically is no cost when no node is DECOMMISSIONING.
  • Constructor Details

    • DecommissioningNodesWatcher

      public DecommissioningNodesWatcher(RMContext rmContext)
  • Method Details

    • init

      public void init(org.apache.hadoop.conf.Configuration conf)
    • update

      public void update(RMNode rmNode, org.apache.hadoop.yarn.server.api.records.NodeStatus remoteNodeStatus)
      Update rmNode decommissioning status based on NodeStatus.
      Parameters:
      rmNode - The node
      remoteNodeStatus - latest NodeStatus
    • remove

      public void remove(org.apache.hadoop.yarn.api.records.NodeId nodeId)
    • stop

      public void stop()
    • checkReadyToBeDecommissioned

      public boolean checkReadyToBeDecommissioned(org.apache.hadoop.yarn.api.records.NodeId nodeId)
    • checkDecommissioningStatus

      public DecommissioningNodesWatcher.DecommissioningNodeStatus checkDecommissioningStatus(org.apache.hadoop.yarn.api.records.NodeId nodeId)