java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, NodeStatusUpdaterpublic class NodeStatusUpdaterImpl extends org.apache.hadoop.service.AbstractService implements NodeStatusUpdater
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS |
| Constructor | Description |
|---|---|
NodeStatusUpdaterImpl(Context context,
org.apache.hadoop.yarn.event.Dispatcher dispatcher,
NodeHealthCheckerService healthChecker,
NodeManagerMetrics metrics) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
Add a container to the list of containers that have recently completed
|
void |
clearFinishedContainersFromCache() |
Clear the list of recently completed containers
|
protected java.util.List<org.apache.hadoop.yarn.api.records.ContainerStatus> |
getContainerStatuses() |
|
protected org.apache.hadoop.yarn.server.api.records.NodeStatus |
getNodeStatus(int responseId) |
|
protected org.apache.hadoop.yarn.server.api.ResourceTracker |
getRMClient() |
|
long |
getRMIdentifier() |
Get the ResourceManager identifier received during registration
|
boolean |
isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) |
Query if a container has recently completed
|
protected boolean |
isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
rebootNodeStatusUpdaterAndRegisterWithRM() |
|
protected void |
registerWithRM() |
|
void |
removeOrTrackCompletedContainersFromContext(java.util.List<org.apache.hadoop.yarn.api.records.ContainerId> containerIds) |
|
void |
removeVeryOldStoppedContainersFromCache() |
|
void |
reportException(java.lang.Exception ex) |
Report an unrecoverable exception.
|
void |
sendOutofBandHeartBeat() |
Schedule a heartbeat to the ResourceManager outside of the normal,
periodic heartbeating process.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
|
protected void |
serviceStart() |
|
protected void |
serviceStop() |
|
void |
setNodeAttributesProvider(NodeAttributesProvider provider) |
Sets a node attributes provider to node manager.
|
void |
setNodeLabelsProvider(NodeLabelsProvider provider) |
Sets a node labels provider to the node manager.
|
protected void |
startStatusUpdater() |
|
protected void |
stopRMProxy() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final java.lang.String YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS
public NodeStatusUpdaterImpl(Context context, org.apache.hadoop.yarn.event.Dispatcher dispatcher, NodeHealthCheckerService healthChecker, NodeManagerMetrics metrics)
public void setNodeAttributesProvider(NodeAttributesProvider provider)
NodeStatusUpdatersetNodeAttributesProvider in interface NodeStatusUpdaterpublic void setNodeLabelsProvider(NodeLabelsProvider provider)
NodeStatusUpdatersetNodeLabelsProvider in interface NodeStatusUpdaterprotected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void rebootNodeStatusUpdaterAndRegisterWithRM()
@VisibleForTesting protected void stopRMProxy()
@Private protected boolean isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf)
@VisibleForTesting
protected org.apache.hadoop.yarn.server.api.ResourceTracker getRMClient()
throws java.io.IOException
java.io.IOException@VisibleForTesting
protected void registerWithRM()
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
org.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOException@VisibleForTesting
protected org.apache.hadoop.yarn.server.api.records.NodeStatus getNodeStatus(int responseId)
throws java.io.IOException
java.io.IOException@VisibleForTesting
protected java.util.List<org.apache.hadoop.yarn.api.records.ContainerStatus> getContainerStatuses()
throws java.io.IOException
java.io.IOExceptionpublic void addCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeStatusUpdateraddCompletedContainer in interface NodeStatusUpdatercontainerId - the ID of the completed container@VisibleForTesting @Private public void removeOrTrackCompletedContainersFromContext(java.util.List<org.apache.hadoop.yarn.api.records.ContainerId> containerIds)
public void sendOutofBandHeartBeat()
NodeStatusUpdatersendOutofBandHeartBeat in interface NodeStatusUpdaterpublic boolean isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeStatusUpdaterisContainerRecentlyStopped in interface NodeStatusUpdatercontainerId - the container IDpublic void clearFinishedContainersFromCache()
NodeStatusUpdaterclearFinishedContainersFromCache in interface NodeStatusUpdater@Private @VisibleForTesting public void removeVeryOldStoppedContainersFromCache()
public long getRMIdentifier()
NodeStatusUpdatergetRMIdentifier in interface NodeStatusUpdaterprotected void startStatusUpdater()
public void reportException(java.lang.Exception ex)
NodeStatusUpdaterreportException in interface NodeStatusUpdaterex - exception that makes the node unhealthyCopyright © 2008–2025 Apache Software Foundation. All rights reserved.