org.apache.hadoop.mapreduce.v2.app.rm
Class RMCommunicator
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
- All Implemented Interfaces:
- Closeable, RMHeartbeatHandler, org.apache.hadoop.service.Service
- Direct Known Subclasses:
- LocalContainerAllocator, RMContainerRequestor
public abstract class RMCommunicator
- extends org.apache.hadoop.service.AbstractService
- implements RMHeartbeatHandler
Registers/unregisters to RM and sends heartbeats to RM.
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
org.apache.hadoop.service.Service.STATE |
| 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 |
applicationId
protected org.apache.hadoop.yarn.api.records.ApplicationId applicationId
allocatorThread
protected Thread allocatorThread
eventHandler
protected org.apache.hadoop.yarn.event.EventHandler eventHandler
scheduler
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol scheduler
lastResponseID
protected int lastResponseID
applicationACLs
protected Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> applicationACLs
isSignalled
protected volatile boolean isSignalled
RMCommunicator
public RMCommunicator(ClientService clientService,
AppContext context)
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
getContext
protected AppContext getContext()
getJob
protected Job getJob()
getApplicationProgress
protected float getApplicationProgress()
- Get the appProgress. Can be used only after this component is started.
- Returns:
- the appProgress.
register
protected void register()
unregister
protected void unregister()
doUnregistration
protected void doUnregistration()
throws org.apache.hadoop.yarn.exceptions.YarnException,
IOException,
InterruptedException
- Throws:
org.apache.hadoop.yarn.exceptions.YarnException
IOException
InterruptedException
getMaxContainerCapability
protected org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()
serviceStop
protected void serviceStop()
throws Exception
- Overrides:
serviceStop in class org.apache.hadoop.service.AbstractService
- Throws:
Exception
startAllocatorThread
protected void startAllocatorThread()
createSchedulerProxy
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol createSchedulerProxy()
heartbeat
protected abstract void heartbeat()
throws Exception
- Throws:
Exception
getLastHeartbeatTime
public long getLastHeartbeatTime()
- Specified by:
getLastHeartbeatTime in interface RMHeartbeatHandler
runOnNextHeartbeat
public void runOnNextHeartbeat(Runnable callback)
- Specified by:
runOnNextHeartbeat in interface RMHeartbeatHandler
setShouldUnregister
public void setShouldUnregister(boolean shouldUnregister)
setSignalled
public void setSignalled(boolean isSignalled)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.