Class FederationClientInterceptor

java.lang.Object
org.apache.hadoop.yarn.server.router.clientrm.AbstractClientRequestInterceptor
org.apache.hadoop.yarn.server.router.clientrm.FederationClientInterceptor
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.yarn.api.ApplicationBaseProtocol, org.apache.hadoop.yarn.api.ApplicationClientProtocol, ClientRequestInterceptor

public class FederationClientInterceptor extends AbstractClientRequestInterceptor
Extends the AbstractRequestInterceptorClient class and provides an implementation for federation of YARN RM and scaling an application across multiple YARN SubClusters. All the federation specific implementation is encapsulated in this class. This is always the last interceptor in the chain.
  • Field Summary

    Fields inherited from class org.apache.hadoop.yarn.server.router.clientrm.AbstractClientRequestInterceptor

    user
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse
    cancelDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse
    deleteReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptResponse
    failApplicationAttempt(org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse
    forceKillApplication(org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest request)
    The YARN Router will forward to the respective YARN RM in which the AM is running.
    org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportResponse
    getApplicationAttemptReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest request)
    The YARN Router will forward to the respective YARN RM in which the AM is running.
    org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsResponse
    getApplicationAttempts(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsRequest request)
     
    protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId
    getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse
    getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest request)
    The YARN Router will forward to the respective YARN RM in which the AM is running.
    org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsResponse
    getApplications(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest request)
    The Yarn Router will forward the request to all the Yarn RMs in parallel, after that it will group all the ApplicationReports by the ApplicationId.
    org.apache.hadoop.yarn.api.protocolrecords.GetAttributesToNodesResponse
    getAttributesToNodes(org.apache.hadoop.yarn.api.protocolrecords.GetAttributesToNodesRequest request)
     
    Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.api.ApplicationClientProtocol>
     
    protected org.apache.hadoop.yarn.api.ApplicationClientProtocol
    getClientRMProxyForSubCluster(org.apache.hadoop.yarn.server.federation.store.records.SubClusterId subClusterId)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse
    getClusterMetrics(org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeAttributesResponse
    getClusterNodeAttributes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeAttributesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeLabelsResponse
    getClusterNodeLabels(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeLabelsRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesResponse
    getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportResponse
    getContainerReport(org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetContainersResponse
    getContainers(org.apache.hadoop.yarn.api.protocolrecords.GetContainersRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenResponse
    getDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenRequest request)
     
    org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade
     
    org.apache.hadoop.yarn.api.protocolrecords.GetLabelsToNodesResponse
    getLabelsToNodes(org.apache.hadoop.yarn.api.protocolrecords.GetLabelsToNodesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse
    getNewApplication(org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationRequest request)
    YARN Router forwards every getNewApplication requests to any RM.
    org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationResponse
    getNewReservation(org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetNodesToAttributesResponse
    getNodesToAttributes(org.apache.hadoop.yarn.api.protocolrecords.GetNodesToAttributesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetNodesToLabelsResponse
    getNodeToLabels(org.apache.hadoop.yarn.api.protocolrecords.GetNodesToLabelsRequest request)
     
    protected int
    getNumMaxThreads(org.apache.hadoop.conf.Configuration conf)
     
    protected int
    getNumMinThreads(org.apache.hadoop.conf.Configuration conf)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoResponse
    getQueueInfo(org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoRequest request)
    The interface used by clients to get information about queues from the ResourceManager.
    org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoResponse
    getQueueUserAcls(org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoRequest request)
     
    protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId
    getReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetResourceProfileResponse
    getResourceProfile(org.apache.hadoop.yarn.api.protocolrecords.GetResourceProfileRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceProfilesResponse
    getResourceProfiles(org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceProfilesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceTypeInfoResponse
    getResourceTypeInfo(org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceTypeInfoRequest request)
     
    void
    init(String userName)
    Initializes the ClientRequestInterceptor.
    org.apache.hadoop.yarn.api.protocolrecords.ReservationListResponse
    listReservations(org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesResponse
    moveApplicationAcrossQueues(org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse
    renewDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest request)
     
    void
    setAllowPartialResult(boolean allowPartialResult)
     
    void
    Sets the ClientRequestInterceptor in the chain.
    void
    setNumSubmitRetries(int numSubmitRetries)
     
    void
    org.apache.hadoop.yarn.api.protocolrecords.SignalContainerResponse
    signalToContainer(org.apache.hadoop.yarn.api.protocolrecords.SignalContainerRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse
    submitApplication(org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest request)
    Today, in YARN there are no checks of any applicationId submitted.
    org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse
    submitReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationPriorityResponse
    updateApplicationPriority(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationPriorityRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsResponse
    updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest request)
     
    org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse
    updateReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request)
     

    Methods inherited from class org.apache.hadoop.yarn.server.router.clientrm.AbstractClientRequestInterceptor

    getConf, getNextInterceptor, getTokenSecretManager, setConf, setTokenSecretManager

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FederationClientInterceptor

      public FederationClientInterceptor()
  • Method Details

    • init

      public void init(String userName)
      Description copied from class: AbstractClientRequestInterceptor
      Initializes the ClientRequestInterceptor.
      Specified by:
      init in interface ClientRequestInterceptor
      Overrides:
      init in class AbstractClientRequestInterceptor
      Parameters:
      userName - the name of the client
    • setNextInterceptor

      public void setNextInterceptor(ClientRequestInterceptor next)
      Description copied from class: AbstractClientRequestInterceptor
      Sets the ClientRequestInterceptor in the chain.
      Specified by:
      setNextInterceptor in interface ClientRequestInterceptor
      Overrides:
      setNextInterceptor in class AbstractClientRequestInterceptor
      Parameters:
      next - the ClientRequestInterceptor to set in the pipeline
    • getClientRMProxyForSubCluster

      @VisibleForTesting protected org.apache.hadoop.yarn.api.ApplicationClientProtocol getClientRMProxyForSubCluster(org.apache.hadoop.yarn.server.federation.store.records.SubClusterId subClusterId) throws org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
    • getNewApplication

      public org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse getNewApplication(org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      YARN Router forwards every getNewApplication requests to any RM. During this operation there will be no communication with the State Store. The Router will forward the requests to any SubCluster. The Router will retry to submit the request on #numSubmitRetries different SubClusters. The SubClusters are randomly chosen from the active ones. Possible failures and behaviors: Client: identical behavior as ClientRMService. Router: the Client will timeout and resubmit. ResourceManager: the Router will timeout and contacts another RM. StateStore: not in the execution.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • submitApplication

      public org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse submitApplication(org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Today, in YARN there are no checks of any applicationId submitted. Base scenarios: The Client submits an application to the Router. The Router selects one SubCluster to forward the request. The Router inserts a tuple into StateStore with the selected SubCluster (e.g. SC1) and the appId. The State Store replies with the selected SubCluster (e.g. SC1). The Router submits the request to the selected SubCluster. In case of State Store failure: The client submits an application to the Router. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC1) and the appId. Due to the State Store down the Router times out and it will retry depending on the FederationFacade settings. The Router replies to the client with an error message. If State Store fails after inserting the tuple: identical behavior as ClientRMService. In case of Router failure: Scenario 1 – Crash before submission to the ResourceManager The Client submits an application to the Router. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC1) and the appId. The Router crashes. The Client timeouts and resubmits the application. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC2) and the appId. Because the tuple is already inserted in the State Store, it returns the previous selected SubCluster (e.g. SC1). The Router submits the request to the selected SubCluster (e.g. SC1). Scenario 2 – Crash after submission to the ResourceManager The Client submits an application to the Router. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC1) and the appId. The Router submits the request to the selected SubCluster. The Router crashes. The Client timeouts and resubmit the application. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC2) and the appId. The State Store replies with the selected SubCluster (e.g. SC1). The Router submits the request to the selected SubCluster (e.g. SC1). When a client re-submits the same application to the same RM, it does not raise an exception and replies with operation successful message. In case of Client failure: identical behavior as ClientRMService. In case of ResourceManager failure: The Client submits an application to the Router. The Router selects one SubCluster to forward the request. The Router inserts a tuple into State Store with the selected SubCluster (e.g. SC1) and the appId. The Router submits the request to the selected SubCluster. The entire SubCluster is down – all the RMs in HA or the master RM is not reachable. The Router times out. The Router selects a new SubCluster to forward the request. The Router update a tuple into State Store with the selected SubCluster (e.g. SC2) and the appId. The State Store replies with OK answer. The Router submits the request to the selected SubCluster (e.g. SC2).
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • forceKillApplication

      public org.apache.hadoop.yarn.api.protocolrecords.KillApplicationResponse forceKillApplication(org.apache.hadoop.yarn.api.protocolrecords.KillApplicationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      The YARN Router will forward to the respective YARN RM in which the AM is running. Possible failures and behaviors: Client: identical behavior as ClientRMService. Router: the Client will timeout and resubmit the request. ResourceManager: the Router will timeout and the call will fail. State Store: the Router will timeout and it will retry depending on the FederationFacade settings - if the failure happened before the select operation.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationReport

      public org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse getApplicationReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      The YARN Router will forward to the respective YARN RM in which the AM is running. Possible failure: Client: identical behavior as ClientRMService. Router: the Client will timeout and resubmit the request. ResourceManager: the Router will timeout and the call will fail. State Store: the Router will timeout and it will retry depending on the FederationFacade settings - if the failure happened before the select operation.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplications

      public org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsResponse getApplications(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      The Yarn Router will forward the request to all the Yarn RMs in parallel, after that it will group all the ApplicationReports by the ApplicationId. Possible failure: Client: identical behavior as ClientRMService. Router: the Client will timeout and resubmit the request. ResourceManager: the Router calls each Yarn RM in parallel. In case a Yarn RM fails, a single call will timeout. However, the Router will merge the ApplicationReports it got, and provides a partial list to the client. State Store: the Router will timeout and it will retry depending on the FederationFacade settings - if the failure happened before the select operation.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getClusterMetrics

      public org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse getClusterMetrics(org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getClusterNodes

      public org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesResponse getClusterNodes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getQueueInfo

      public org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoResponse getQueueInfo(org.apache.hadoop.yarn.api.protocolrecords.GetQueueInfoRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException

      The interface used by clients to get information about queues from the ResourceManager.

      The client, via GetQueueInfoRequest, can ask for details such as used/total resources, child queues, running applications etc.

      In secure mode,the ResourceManager verifies access before providing the information.

      Parameters:
      request - request to get queue information
      Returns:
      queue information
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException - exceptions from yarn servers.
      IOException - io error occur.
    • getQueueUserAcls

      public org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoResponse getQueueUserAcls(org.apache.hadoop.yarn.api.protocolrecords.GetQueueUserAclsInfoRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • moveApplicationAcrossQueues

      public org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesResponse moveApplicationAcrossQueues(org.apache.hadoop.yarn.api.protocolrecords.MoveApplicationAcrossQueuesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getNewReservation

      public org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationResponse getNewReservation(org.apache.hadoop.yarn.api.protocolrecords.GetNewReservationRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • submitReservation

      public org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionResponse submitReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • listReservations

      public org.apache.hadoop.yarn.api.protocolrecords.ReservationListResponse listReservations(org.apache.hadoop.yarn.api.protocolrecords.ReservationListRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • updateReservation

      public org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateResponse updateReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationUpdateRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • deleteReservation

      public org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteResponse deleteReservation(org.apache.hadoop.yarn.api.protocolrecords.ReservationDeleteRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getNodeToLabels

      public org.apache.hadoop.yarn.api.protocolrecords.GetNodesToLabelsResponse getNodeToLabels(org.apache.hadoop.yarn.api.protocolrecords.GetNodesToLabelsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getLabelsToNodes

      public org.apache.hadoop.yarn.api.protocolrecords.GetLabelsToNodesResponse getLabelsToNodes(org.apache.hadoop.yarn.api.protocolrecords.GetLabelsToNodesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getClusterNodeLabels

      public org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeLabelsResponse getClusterNodeLabels(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeLabelsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationAttemptReport

      public org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportResponse getApplicationAttemptReport(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      The YARN Router will forward to the respective YARN RM in which the AM is running. Possible failure: Client: identical behavior as ClientRMService. Router: the Client will timeout and resubmit the request. ResourceManager: the Router will timeout and the call will fail. State Store: the Router will timeout and it will retry depending on the FederationFacade settings - if the failure happened before the select operation.
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationAttempts

      public org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsResponse getApplicationAttempts(org.apache.hadoop.yarn.api.protocolrecords.GetApplicationAttemptsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getContainerReport

      public org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportResponse getContainerReport(org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getContainers

      public org.apache.hadoop.yarn.api.protocolrecords.GetContainersResponse getContainers(org.apache.hadoop.yarn.api.protocolrecords.GetContainersRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getDelegationToken

      public org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenResponse getDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.GetDelegationTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • renewDelegationToken

      public org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenResponse renewDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.RenewDelegationTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • cancelDelegationToken

      public org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenResponse cancelDelegationToken(org.apache.hadoop.yarn.api.protocolrecords.CancelDelegationTokenRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • failApplicationAttempt

      public org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptResponse failApplicationAttempt(org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • updateApplicationPriority

      public org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationPriorityResponse updateApplicationPriority(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationPriorityRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • signalToContainer

      public org.apache.hadoop.yarn.api.protocolrecords.SignalContainerResponse signalToContainer(org.apache.hadoop.yarn.api.protocolrecords.SignalContainerRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • updateApplicationTimeouts

      public org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsResponse updateApplicationTimeouts(org.apache.hadoop.yarn.api.protocolrecords.UpdateApplicationTimeoutsRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getResourceProfiles

      public org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceProfilesResponse getResourceProfiles(org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceProfilesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getResourceProfile

      public org.apache.hadoop.yarn.api.protocolrecords.GetResourceProfileResponse getResourceProfile(org.apache.hadoop.yarn.api.protocolrecords.GetResourceProfileRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getResourceTypeInfo

      public org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceTypeInfoResponse getResourceTypeInfo(org.apache.hadoop.yarn.api.protocolrecords.GetAllResourceTypeInfoRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • shutdown

      public void shutdown()
      Description copied from class: AbstractClientRequestInterceptor
      Specified by:
      shutdown in interface ClientRequestInterceptor
      Overrides:
      shutdown in class AbstractClientRequestInterceptor
    • getAttributesToNodes

      public org.apache.hadoop.yarn.api.protocolrecords.GetAttributesToNodesResponse getAttributesToNodes(org.apache.hadoop.yarn.api.protocolrecords.GetAttributesToNodesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getClusterNodeAttributes

      public org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeAttributesResponse getClusterNodeAttributes(org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodeAttributesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getNodesToAttributes

      public org.apache.hadoop.yarn.api.protocolrecords.GetNodesToAttributesResponse getNodesToAttributes(org.apache.hadoop.yarn.api.protocolrecords.GetNodesToAttributesRequest request) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException
    • getApplicationHomeSubCluster

      protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId getApplicationHomeSubCluster(org.apache.hadoop.yarn.api.records.ApplicationId applicationId) throws org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
    • getReservationHomeSubCluster

      protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterId getReservationHomeSubCluster(org.apache.hadoop.yarn.api.records.ReservationId reservationId) throws org.apache.hadoop.yarn.exceptions.YarnException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
    • getFederationFacade

      @VisibleForTesting public org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade getFederationFacade()
    • getClientRMProxies

      @VisibleForTesting public Map<org.apache.hadoop.yarn.server.federation.store.records.SubClusterId,org.apache.hadoop.yarn.api.ApplicationClientProtocol> getClientRMProxies()
    • getNumMinThreads

      protected int getNumMinThreads(org.apache.hadoop.conf.Configuration conf)
    • getNumMaxThreads

      protected int getNumMaxThreads(org.apache.hadoop.conf.Configuration conf)
    • setNumSubmitRetries

      @VisibleForTesting public void setNumSubmitRetries(int numSubmitRetries)
    • setAllowPartialResult

      @VisibleForTesting public void setAllowPartialResult(boolean allowPartialResult)