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 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

      public String 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:
      registerApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • 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:
      finishApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • 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:
      allocate in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocol
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getAllocationHistory

      public ContainerAllocationHistory getAllocationHistory()
    • gatherReadOnlyPendingAsksInfo

      public void gatherReadOnlyPendingAsksInfo(Map<ResourceRequestSetKey,ResourceRequestSet> pendingAsks, Map<ResourceRequestSetKey,Long> pendingTime)
    • getRemotePendingAsks

      @VisibleForTesting protected Map<ResourceRequestSetKey,ResourceRequestSet> getRemotePendingAsks()