Package org.apache.hadoop.yarn.server
Class AMRMClientRelayer
java.lang.Object
org.apache.hadoop.yarn.server.AMRMClientRelayer
- All Implemented Interfaces:
org.apache.hadoop.yarn.api.ApplicationMasterProtocol
public class AMRMClientRelayer
extends Object
implements org.apache.hadoop.yarn.api.ApplicationMasterProtocol
A component that sits in between AMRMClient(Impl) and Yarn RM. It remembers
pending requests similar to AMRMClient, and handles RM re-sync automatically
without propagate the re-sync exception back to AMRMClient.
-
Constructor Summary
ConstructorsConstructorDescriptionAMRMClientRelayer(org.apache.hadoop.yarn.api.ApplicationMasterProtocol rmClient, org.apache.hadoop.yarn.api.records.ApplicationId appId, String rmId) AMRMClientRelayer(org.apache.hadoop.yarn.api.ApplicationMasterProtocol rmClient, org.apache.hadoop.yarn.api.records.ApplicationId appId, String rmId, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.yarn.api.protocolrecords.AllocateResponseallocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest allocateRequest) org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponsefinishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request) voidgatherReadOnlyPendingAsksInfo(Map<ResourceRequestSetKey, ResourceRequestSet> pendingAsks, Map<ResourceRequestSetKey, Long> pendingTime) protected Map<ResourceRequestSetKey,ResourceRequestSet> org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponseregisterApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) voidsetAMRegistrationRequest(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest registerRequest) voidsetRMClient(org.apache.hadoop.yarn.api.ApplicationMasterProtocol client) voidshutdown()
-
Constructor Details
-
AMRMClientRelayer
public AMRMClientRelayer(org.apache.hadoop.yarn.api.ApplicationMasterProtocol rmClient, org.apache.hadoop.yarn.api.records.ApplicationId appId, String rmId) -
AMRMClientRelayer
public AMRMClientRelayer(org.apache.hadoop.yarn.api.ApplicationMasterProtocol rmClient, org.apache.hadoop.yarn.api.records.ApplicationId appId, String rmId, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
setAMRegistrationRequest
public void setAMRegistrationRequest(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest registerRequest) -
getRMIdentifier
-
setRMClient
public void setRMClient(org.apache.hadoop.yarn.api.ApplicationMasterProtocol client) -
shutdown
public void shutdown() -
registerApplicationMaster
public org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Specified by:
registerApplicationMasterin interfaceorg.apache.hadoop.yarn.api.ApplicationMasterProtocol- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
finishApplicationMaster
public org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Specified by:
finishApplicationMasterin interfaceorg.apache.hadoop.yarn.api.ApplicationMasterProtocol- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
allocate
public org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest allocateRequest) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException - Specified by:
allocatein interfaceorg.apache.hadoop.yarn.api.ApplicationMasterProtocol- Throws:
org.apache.hadoop.yarn.exceptions.YarnExceptionIOException
-
getAllocationHistory
-
gatherReadOnlyPendingAsksInfo
public void gatherReadOnlyPendingAsksInfo(Map<ResourceRequestSetKey, ResourceRequestSet> pendingAsks, Map<ResourceRequestSetKey, Long> pendingTime) -
getRemotePendingAsks
-