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.
  • Constructor Details

    • OpportunisticContainerAllocatorAMService

      public OpportunisticContainerAllocatorAMService(RMContext rmContext, YarnScheduler scheduler)
  • 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:
      getServer in class ApplicationMasterService
    • getProcessorList

      protected List<org.apache.hadoop.yarn.ams.ApplicationMasterServiceProcessor> getProcessorList(org.apache.hadoop.conf.Configuration conf)
      Overrides:
      getProcessorList in class ApplicationMasterService
    • 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:
      registerApplicationMasterForDistributedScheduling in interface org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • 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:
      allocateForDistributedScheduling in interface org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • serviceStart

      protected void serviceStart() throws Exception
      Overrides:
      serviceStart in class ApplicationMasterService
      Throws:
      Exception
    • serviceStop

      protected void serviceStop() throws Exception
      Overrides:
      serviceStop in class ApplicationMasterService
      Throws:
      Exception
    • handle

      public void handle(SchedulerEvent event)
      Specified by:
      handle in interface org.apache.hadoop.yarn.event.EventHandler<SchedulerEvent>