Interface NodeStatusUpdater
- All Superinterfaces:
AutoCloseable,Closeable,org.apache.hadoop.service.Service
- All Known Implementing Classes:
NodeStatusUpdaterImpl
public interface NodeStatusUpdater
extends org.apache.hadoop.service.Service
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) Add a container to the list of containers that have recently completedvoidClear the list of recently completed containerslongGet the ResourceManager identifier received during registrationbooleanisContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) Query if a container has recently completedvoidReport an unrecoverable exception.voidSchedule a heartbeat to the ResourceManager outside of the normal, periodic heartbeating process.voidSets a node attributes provider to node manager.voidsetNodeLabelsProvider(NodeLabelsProvider provider) Sets a node labels provider to the node manager.Methods inherited from interface org.apache.hadoop.service.Service
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, registerServiceListener, start, stop, unregisterServiceListener, waitForServiceToStop
-
Method Details
-
sendOutofBandHeartBeat
void sendOutofBandHeartBeat()Schedule a heartbeat to the ResourceManager outside of the normal, periodic heartbeating process. This is typically called when the state of containers on the node has changed to notify the RM sooner. -
getRMIdentifier
long getRMIdentifier()Get the ResourceManager identifier received during registration- Returns:
- the ResourceManager ID
-
isContainerRecentlyStopped
boolean isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId) Query if a container has recently completed- Parameters:
containerId- the container ID- Returns:
- true if the container has recently completed
-
addCompletedContainer
void addCompletedContainer(org.apache.hadoop.yarn.api.records.ContainerId containerId) Add a container to the list of containers that have recently completed- Parameters:
containerId- the ID of the completed container
-
clearFinishedContainersFromCache
void clearFinishedContainersFromCache()Clear the list of recently completed containers -
reportException
Report an unrecoverable exception.- Parameters:
ex- exception that makes the node unhealthy
-
setNodeAttributesProvider
Sets a node attributes provider to node manager.- Parameters:
provider-
-
setNodeLabelsProvider
Sets a node labels provider to the node manager.- Parameters:
provider-
-