Class DecommissioningNodesWatcher
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.DecommissioningNodesWatcher
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStatus about a specific decommissioning node. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckDecommissioningStatus(org.apache.hadoop.yarn.api.records.NodeId nodeId) booleancheckReadyToBeDecommissioned(org.apache.hadoop.yarn.api.records.NodeId nodeId) voidinit(org.apache.hadoop.conf.Configuration conf) voidremove(org.apache.hadoop.yarn.api.records.NodeId nodeId) voidstop()voidUpdate rmNode decommissioning status based on NodeStatus.
-
Constructor Details
-
DecommissioningNodesWatcher
-
-
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 noderemoteNodeStatus- 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)
-