public class NodeStatusUpdaterImpl extends org.apache.hadoop.service.AbstractService implements NodeStatusUpdater
Modifier and Type | Field and Description |
---|---|
static String |
YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS |
Constructor and Description |
---|
NodeStatusUpdaterImpl(Context context,
org.apache.hadoop.yarn.event.Dispatcher dispatcher,
NodeHealthCheckerService healthChecker,
NodeManagerMetrics metrics) |
Modifier and Type | Method and 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 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(List<org.apache.hadoop.yarn.api.records.ContainerId> containerIds) |
void |
removeVeryOldStoppedContainersFromCache() |
void |
reportException(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, waitForServiceToStop
public static final 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)
NodeStatusUpdater
setNodeAttributesProvider
in interface NodeStatusUpdater
public void setNodeLabelsProvider(NodeLabelsProvider provider)
NodeStatusUpdater
setNodeLabelsProvider
in interface NodeStatusUpdater
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
protected void rebootNodeStatusUpdaterAndRegisterWithRM()
@VisibleForTesting protected void stopRMProxy()
@InterfaceAudience.Private protected boolean isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf)
@VisibleForTesting protected org.apache.hadoop.yarn.server.api.ResourceTracker getRMClient() throws IOException
IOException
@VisibleForTesting protected void registerWithRM() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
org.apache.hadoop.yarn.exceptions.YarnException
IOException
@VisibleForTesting protected org.apache.hadoop.yarn.server.api.records.NodeStatus getNodeStatus(int responseId) throws IOException
IOException
@VisibleForTesting protected List<org.apache.hadoop.yarn.api.records.ContainerStatus> getContainerStatuses() throws IOException
IOException
public void addCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeStatusUpdater
addCompletedContainer
in interface NodeStatusUpdater
containerId
- the ID of the completed container@VisibleForTesting @InterfaceAudience.Private public void removeOrTrackCompletedContainersFromContext(List<org.apache.hadoop.yarn.api.records.ContainerId> containerIds)
public void sendOutofBandHeartBeat()
NodeStatusUpdater
sendOutofBandHeartBeat
in interface NodeStatusUpdater
public boolean isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeStatusUpdater
isContainerRecentlyStopped
in interface NodeStatusUpdater
containerId
- the container IDpublic void clearFinishedContainersFromCache()
NodeStatusUpdater
clearFinishedContainersFromCache
in interface NodeStatusUpdater
@InterfaceAudience.Private @VisibleForTesting public void removeVeryOldStoppedContainersFromCache()
public long getRMIdentifier()
NodeStatusUpdater
getRMIdentifier
in interface NodeStatusUpdater
protected void startStatusUpdater()
public void reportException(Exception ex)
NodeStatusUpdater
reportException
in interface NodeStatusUpdater
ex
- exception that makes the node unhealthyCopyright © 2008–2024 Apache Software Foundation. All rights reserved.