org.apache.hadoop.mapreduce.v2.app.rm
Class RMCommunicator
java.lang.Object
org.apache.hadoop.yarn.service.AbstractService
org.apache.hadoop.mapreduce.v2.app.rm.RMCommunicator
- All Implemented Interfaces:
- RMHeartbeatHandler, org.apache.hadoop.yarn.service.Service
- Direct Known Subclasses:
- LocalContainerAllocator, RMContainerRequestor
public abstract class RMCommunicator
- extends org.apache.hadoop.yarn.service.AbstractService
- implements RMHeartbeatHandler
Registers/unregisters to RM and sends heartbeats to RM.
| Nested classes/interfaces inherited from interface org.apache.hadoop.yarn.service.Service |
org.apache.hadoop.yarn.service.Service.STATE |
| Methods inherited from class org.apache.hadoop.yarn.service.AbstractService |
getConfig, getName, getServiceState, getStartTime, register, unregister |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
applicationId
protected org.apache.hadoop.yarn.api.records.ApplicationId applicationId
applicationAttemptId
protected org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId
allocatorThread
protected Thread allocatorThread
eventHandler
protected org.apache.hadoop.yarn.event.EventHandler eventHandler
scheduler
protected org.apache.hadoop.yarn.api.AMRMProtocol 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)
init
public void init(org.apache.hadoop.conf.Configuration conf)
- Specified by:
init in interface org.apache.hadoop.yarn.service.Service- Overrides:
init in class org.apache.hadoop.yarn.service.AbstractService
start
public void start()
- Specified by:
start in interface org.apache.hadoop.yarn.service.Service- Overrides:
start in class org.apache.hadoop.yarn.service.AbstractService
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()
getMinContainerCapability
protected org.apache.hadoop.yarn.api.records.Resource getMinContainerCapability()
getMaxContainerCapability
protected org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()
stop
public void stop()
- Specified by:
stop in interface org.apache.hadoop.yarn.service.Service- Overrides:
stop in class org.apache.hadoop.yarn.service.AbstractService
startAllocatorThread
protected void startAllocatorThread()
createSchedulerProxy
protected org.apache.hadoop.yarn.api.AMRMProtocol 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 © 2013 Apache Software Foundation. All Rights Reserved.