Class OpportunisticContainerAllocatorAMService
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService
org.apache.hadoop.yarn.server.resourcemanager.OpportunisticContainerAllocatorAMService
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service,org.apache.hadoop.yarn.api.ApplicationMasterProtocol,org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>,org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol
public class OpportunisticContainerAllocatorAMService
extends ApplicationMasterService
implements org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol, org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>
The OpportunisticContainerAllocatorAMService is started instead of the
ApplicationMasterService if opportunistic scheduling is enabled for the YARN
cluster (either centralized or distributed opportunistic scheduling).
It extends the functionality of the ApplicationMasterService by servicing
clients (AMs and AMRMProxy request interceptors) that understand the
DistributedSchedulingProtocol.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService
ApplicationMasterService.AllocateResponseLockNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService
EMPTY_ALLOCATION, masterServiceAddress, recordFactory, rmContext, server -
Constructor Summary
ConstructorsConstructorDescriptionOpportunisticContainerAllocatorAMService(RMContext rmContext, YarnScheduler scheduler) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateResponseallocateForDistributedScheduling(org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateRequest request) protected List<org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor>getProcessorList(org.apache.hadoop.conf.Configuration conf) org.apache.hadoop.ipc.ServergetServer(org.apache.hadoop.yarn.ipc.YarnRPC rpc, org.apache.hadoop.conf.Configuration serverConf, InetSocketAddress addr, AMRMTokenSecretManager secretManager) voidhandle(SchedulerEvent event) org.apache.hadoop.yarn.server.api.protocolrecords.RegisterDistributedSchedulingAMResponseregisterApplicationMasterForDistributedScheduling(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) protected voidprotected voidMethods inherited from class org.apache.hadoop.yarn.server.resourcemanager.ApplicationMasterService
allocate, finishApplicationMaster, getBindAddress, getProcessingChain, getServer, hasApplicationMasterRegistered, refreshServiceAcls, registerAppAttempt, registerApplicationMaster, serviceInit, setAttemptLastResponseId, unregisterAttemptMethods 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, waitForServiceToStopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
allocate, finishApplicationMaster, registerApplicationMaster
-
Constructor Details
-
OpportunisticContainerAllocatorAMService
-
-
Method Details
-
getServer
public org.apache.hadoop.ipc.Server getServer(org.apache.hadoop.yarn.ipc.YarnRPC rpc, org.apache.hadoop.conf.Configuration serverConf, InetSocketAddress addr, AMRMTokenSecretManager secretManager) - Overrides:
getServerin classApplicationMasterService
-
getProcessorList
protected List<org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor> getProcessorList(org.apache.hadoop.conf.Configuration conf) - Overrides:
getProcessorListin classApplicationMasterService
-
registerApplicationMasterForDistributedScheduling
public org.apache.hadoop.yarn.server.api.protocolrecords.RegisterDistributedSchedulingAMResponse registerApplicationMasterForDistributedScheduling(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Specified by:
registerApplicationMasterForDistributedSchedulingin interfaceorg.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
allocateForDistributedScheduling
public org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateResponse allocateForDistributedScheduling(org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Specified by:
allocateForDistributedSchedulingin interfaceorg.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
serviceStart
- Overrides:
serviceStartin classApplicationMasterService- Throws:
Exception
-
serviceStop
- Overrides:
serviceStopin classApplicationMasterService- Throws:
Exception
-
handle
- Specified by:
handlein interfaceorg.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>
-