public final class DistributedScheduler extends AbstractRequestInterceptor
The DistributedScheduler runs on the NodeManager and is modeled as an
 AMRMProxy request interceptor. It is responsible for the
 following:
ApplicationMasterProtocol calls and unwrap the
   response objects to extract instructions from the
   ClusterMonitor running on the ResourceManager to aid in making
   distributed scheduling decisions.OpportunisticContainerAllocator to allocate
   containers for the outstanding OPPORTUNISTIC container requests.| Constructor and Description | 
|---|
| DistributedScheduler() | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse | allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)Route allocate call to the allocateForDistributedScheduling method and
 return response to the caller after stripping away Distributed Scheduling
 information. | 
| org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateResponse | allocateForDistributedScheduling(org.apache.hadoop.yarn.server.api.protocolrecords.DistributedSchedulingAllocateRequest request)Default implementation that invokes the distributed scheduling version
 of the register method. | 
| org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse | finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request) | 
| void | init(AMRMProxyApplicationContext applicationContext)Initializes the  RequestInterceptor. | 
| org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse | registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)Route register call to the corresponding distributed scheduling method viz. | 
| org.apache.hadoop.yarn.server.api.protocolrecords.RegisterDistributedSchedulingAMResponse | registerApplicationMasterForDistributedScheduling(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)Default implementation that invokes the distributed scheduling version
 of the allocate method. | 
getApplicationContext, getConf, getNextInterceptor, getNMStateStore, recover, setConf, setNextInterceptor, shutdownpublic void init(AMRMProxyApplicationContext applicationContext)
AbstractRequestInterceptorRequestInterceptor.init in interface RequestInterceptorinit in class AbstractRequestInterceptorapplicationContext - AMRMProxy application contextpublic org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)
                                                                                                       throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                              IOException
request - registration requestorg.apache.hadoop.yarn.exceptions.YarnException - YarnExceptionIOException - IOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
                                                                     throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                            IOException
request - allocation requestorg.apache.hadoop.yarn.exceptions.YarnException - YarnExceptionIOException - IOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
                                                                                                   throws org.apache.hadoop.yarn.exceptions.YarnException,
                                                                                                          IOException
org.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic 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
AbstractRequestInterceptorregisterApplicationMasterForDistributedScheduling in interface org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocolregisterApplicationMasterForDistributedScheduling in class AbstractRequestInterceptorrequest - ApplicationMaster registration requestorg.apache.hadoop.yarn.exceptions.YarnException - if failsIOException - if failspublic 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
AbstractRequestInterceptorallocateForDistributedScheduling in interface org.apache.hadoop.yarn.server.api.DistributedSchedulingAMProtocolallocateForDistributedScheduling in class AbstractRequestInterceptorrequest - ApplicationMaster allocate requestorg.apache.hadoop.yarn.exceptions.YarnException - if failsIOException - if failsCopyright © 2008–2023 Apache Software Foundation. All rights reserved.