org.apache.hadoop.yarn.server.nodemanager
Class NodeStatusUpdaterImpl

java.lang.Object
  extended by org.apache.hadoop.service.AbstractService
      extended by org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl
All Implemented Interfaces:
Closeable, org.apache.hadoop.service.Service, NodeStatusUpdater

public class NodeStatusUpdaterImpl
extends org.apache.hadoop.service.AbstractService
implements NodeStatusUpdater


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE
 
Field Summary
static String YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS
           
 
Constructor Summary
NodeStatusUpdaterImpl(Context context, org.apache.hadoop.yarn.event.Dispatcher dispatcher, NodeHealthCheckerService healthChecker, NodeManagerMetrics metrics)
           
 
Method Summary
 void addStoppedContainersToCache(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
 void clearFinishedContainersFromCache()
           
 org.apache.hadoop.yarn.server.api.records.NodeStatus getNodeStatusAndUpdateContainersInContext(int responseId)
           
protected  org.apache.hadoop.yarn.server.api.ResourceTracker getRMClient()
           
 long getRMIdentifier()
           
 boolean isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
           
protected  boolean isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf)
           
protected  void rebootNodeStatusUpdater()
           
protected  void registerWithRM()
           
 void removeVeryOldStoppedContainersFromCache()
           
 void sendOutofBandHeartBeat()
           
protected  void serviceInit(org.apache.hadoop.conf.Configuration conf)
           
protected  void serviceStart()
           
protected  void serviceStop()
           
protected  void startStatusUpdater()
           
protected  void stopRMProxy()
           
 
Methods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS

public static final String YARN_NODEMANAGER_DURATION_TO_TRACK_STOPPED_CONTAINERS
See Also:
Constant Field Values
Constructor Detail

NodeStatusUpdaterImpl

public NodeStatusUpdaterImpl(Context context,
                             org.apache.hadoop.yarn.event.Dispatcher dispatcher,
                             NodeHealthCheckerService healthChecker,
                             NodeManagerMetrics metrics)
Method Detail

serviceInit

protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
                    throws Exception
Overrides:
serviceInit in class org.apache.hadoop.service.AbstractService
Throws:
Exception

serviceStart

protected void serviceStart()
                     throws Exception
Overrides:
serviceStart in class org.apache.hadoop.service.AbstractService
Throws:
Exception

serviceStop

protected void serviceStop()
                    throws Exception
Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
Throws:
Exception

rebootNodeStatusUpdater

protected void rebootNodeStatusUpdater()

stopRMProxy

protected void stopRMProxy()

isTokenKeepAliveEnabled

@InterfaceAudience.Private
protected boolean isTokenKeepAliveEnabled(org.apache.hadoop.conf.Configuration conf)

getRMClient

protected org.apache.hadoop.yarn.server.api.ResourceTracker getRMClient()
                                                                 throws IOException
Throws:
IOException

registerWithRM

protected void registerWithRM()
                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                              IOException
Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException

getNodeStatusAndUpdateContainersInContext

public org.apache.hadoop.yarn.server.api.records.NodeStatus getNodeStatusAndUpdateContainersInContext(int responseId)
Specified by:
getNodeStatusAndUpdateContainersInContext in interface NodeStatusUpdater

sendOutofBandHeartBeat

public void sendOutofBandHeartBeat()
Specified by:
sendOutofBandHeartBeat in interface NodeStatusUpdater

isContainerRecentlyStopped

public boolean isContainerRecentlyStopped(org.apache.hadoop.yarn.api.records.ContainerId containerId)
Specified by:
isContainerRecentlyStopped in interface NodeStatusUpdater

addStoppedContainersToCache

@InterfaceAudience.Private
public void addStoppedContainersToCache(org.apache.hadoop.yarn.api.records.ContainerId containerId)

clearFinishedContainersFromCache

public void clearFinishedContainersFromCache()
Specified by:
clearFinishedContainersFromCache in interface NodeStatusUpdater

removeVeryOldStoppedContainersFromCache

@InterfaceAudience.Private
public void removeVeryOldStoppedContainersFromCache()

getRMIdentifier

public long getRMIdentifier()
Specified by:
getRMIdentifier in interface NodeStatusUpdater

startStatusUpdater

protected void startStatusUpdater()


Copyright © 2014 Apache Software Foundation. All Rights Reserved.