public abstract class RMCommunicator extends org.apache.hadoop.service.AbstractService implements RMHeartbeatHandler
Modifier and Type | Class and Description |
---|---|
class |
RMCommunicator.AllocatorRunnable |
Modifier and Type | Field and Description |
---|---|
protected Thread |
allocatorThread |
protected Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> |
applicationACLs |
protected org.apache.hadoop.yarn.api.records.ApplicationId |
applicationId |
protected org.apache.hadoop.yarn.event.EventHandler |
eventHandler |
protected boolean |
isSignalled |
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol |
scheduler |
Constructor and Description |
---|
RMCommunicator(ClientService clientService,
AppContext context) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol |
createSchedulerProxy() |
protected void |
doUnregistration() |
protected float |
getApplicationProgress()
Get the appProgress.
|
protected AppContext |
getContext() |
protected Job |
getJob() |
long |
getLastHeartbeatTime() |
protected org.apache.hadoop.yarn.api.records.Resource |
getMaxContainerCapability() |
EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> |
getSchedulerResourceTypes() |
protected abstract void |
heartbeat() |
protected boolean |
isApplicationMasterRegistered() |
protected void |
register() |
void |
runOnNextHeartbeat(Runnable callback) |
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
protected void |
serviceStart() |
protected void |
serviceStop() |
void |
setShouldUnregister(boolean shouldUnregister) |
void |
setSignalled(boolean isSignalled) |
protected void |
startAllocatorThread() |
protected void |
unregister() |
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
protected org.apache.hadoop.yarn.api.records.ApplicationId applicationId
protected Thread allocatorThread
protected org.apache.hadoop.yarn.event.EventHandler eventHandler
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol scheduler
protected Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,String> applicationACLs
protected volatile boolean isSignalled
public RMCommunicator(ClientService clientService, AppContext context)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf) throws Exception
serviceInit
in class org.apache.hadoop.service.AbstractService
Exception
protected void serviceStart() throws Exception
serviceStart
in class org.apache.hadoop.service.AbstractService
Exception
protected AppContext getContext()
protected Job getJob()
protected float getApplicationProgress()
protected void register()
protected void unregister()
@VisibleForTesting protected void doUnregistration() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException, InterruptedException
org.apache.hadoop.yarn.exceptions.YarnException
IOException
InterruptedException
protected org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()
protected void serviceStop() throws Exception
serviceStop
in class org.apache.hadoop.service.AbstractService
Exception
protected void startAllocatorThread()
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol createSchedulerProxy()
public long getLastHeartbeatTime()
getLastHeartbeatTime
in interface RMHeartbeatHandler
public void runOnNextHeartbeat(Runnable callback)
runOnNextHeartbeat
in interface RMHeartbeatHandler
public void setShouldUnregister(boolean shouldUnregister)
public void setSignalled(boolean isSignalled)
@VisibleForTesting protected boolean isApplicationMasterRegistered()
public EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulerResourceTypes()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.