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, waitForServiceToStoppublic 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)
NodeStatusUpdatersetNodeAttributesProvider in interface NodeStatusUpdaterpublic void setNodeLabelsProvider(NodeLabelsProvider provider)
NodeStatusUpdatersetNodeLabelsProvider in interface NodeStatusUpdaterprotected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionprotected void rebootNodeStatusUpdaterAndRegisterWithRM()
protected void stopRMProxy()
@InterfaceAudience.Private protected boolean isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf)
protected org.apache.hadoop.yarn.server.api.ResourceTracker getRMClient()
throws IOException
IOExceptionprotected void registerWithRM()
throws org.apache.hadoop.yarn.exceptions.YarnException,
IOException
org.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionprotected org.apache.hadoop.yarn.server.api.records.NodeStatus getNodeStatus(int responseId)
throws IOException
IOExceptionprotected List<org.apache.hadoop.yarn.api.records.ContainerStatus> getContainerStatuses() throws IOException
IOExceptionpublic void addCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId)
NodeStatusUpdateraddCompletedContainer in interface NodeStatusUpdatercontainerId - the ID of the completed container@InterfaceAudience.Private public void removeOrTrackCompletedContainersFromContext(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@InterfaceAudience.Private public void removeVeryOldStoppedContainersFromCache()
public long getRMIdentifier()
NodeStatusUpdatergetRMIdentifier in interface NodeStatusUpdaterprotected void startStatusUpdater()
public void reportException(Exception ex)
NodeStatusUpdaterreportException in interface NodeStatusUpdaterex - exception that makes the node unhealthyCopyright © 2008–2022 Apache Software Foundation. All rights reserved.