java.io.Closeable, java.lang.AutoCloseable, RMHeartbeatHandler, org.apache.hadoop.service.ServiceLocalContainerAllocator, RMContainerRequestorpublic abstract class RMCommunicator extends org.apache.hadoop.service.AbstractService implements RMHeartbeatHandler
| Modifier and Type | Class | Description |
|---|---|---|
class |
RMCommunicator.AllocatorRunnable |
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.Thread |
allocatorThread |
|
protected java.util.Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,java.lang.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 | Description |
|---|---|
RMCommunicator(ClientService clientService,
AppContext context) |
| Modifier and Type | Method | 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() |
|
java.util.EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> |
getSchedulerResourceTypes() |
|
protected abstract void |
heartbeat() |
|
protected boolean |
isApplicationMasterRegistered() |
|
protected void |
register() |
|
void |
runOnNextHeartbeat(java.lang.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, waitForServiceToStopprotected org.apache.hadoop.yarn.api.records.ApplicationId applicationId
protected java.lang.Thread allocatorThread
protected org.apache.hadoop.yarn.event.EventHandler eventHandler
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol scheduler
protected java.util.Map<org.apache.hadoop.yarn.api.records.ApplicationAccessType,java.lang.String> applicationACLs
protected volatile boolean isSignalled
public RMCommunicator(ClientService clientService, AppContext context)
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws java.lang.Exception
serviceInit in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected 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,
java.io.IOException,
java.lang.InterruptedException
org.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionjava.lang.InterruptedExceptionprotected org.apache.hadoop.yarn.api.records.Resource getMaxContainerCapability()
protected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.AbstractServicejava.lang.Exceptionprotected void startAllocatorThread()
protected org.apache.hadoop.yarn.api.ApplicationMasterProtocol createSchedulerProxy()
protected abstract void heartbeat()
throws java.lang.Exception
java.lang.Exceptionpublic long getLastHeartbeatTime()
getLastHeartbeatTime in interface RMHeartbeatHandlerpublic void runOnNextHeartbeat(java.lang.Runnable callback)
runOnNextHeartbeat in interface RMHeartbeatHandlerpublic void setShouldUnregister(boolean shouldUnregister)
public void setSignalled(boolean isSignalled)
@VisibleForTesting protected boolean isApplicationMasterRegistered()
public java.util.EnumSet<org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes> getSchedulerResourceTypes()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.