public class AMRMProxyService
extends org.apache.hadoop.service.AbstractService
implements org.apache.hadoop.yarn.api.ApplicationMasterProtocol
| Modifier and Type | Class and Description |
|---|---|
static class |
AMRMProxyService.RequestInterceptorChainWrapper
Private structure for encapsulating RequestInterceptor and
ApplicationAttemptId instances.
|
| Constructor and Description |
|---|
AMRMProxyService(Context nmContext,
org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher)
Creates an instance of the service.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse |
allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
This is called by the AMs started on this node to send heart beat to RM.
|
protected RequestInterceptor |
createRequestInterceptorChain()
This method creates and returns reference of the first intercepter in the
chain of request intercepter instances.
|
org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse |
finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
This is called by the AMs started on this node to unregister from the RM.
|
InetSocketAddress |
getBindAddress() |
protected Map<org.apache.hadoop.yarn.api.records.ApplicationId,AMRMProxyService.RequestInterceptorChainWrapper> |
getPipelines()
Gets the Request intercepter chains for all the applications.
|
AMRMProxyTokenSecretManager |
getSecretManager() |
protected void |
initializePipeline(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> amrmToken,
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> localToken)
Initializes the request intercepter pipeline for the specified application.
|
void |
processApplicationStartRequest(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest request)
Callback from the ContainerManager implementation for initializing the
application request processing pipeline.
|
org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse |
registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)
This is called by the AMs started on this node to register with the RM.
|
protected void |
serviceStart() |
protected void |
serviceStop() |
protected void |
stopApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
Shuts down the request processing pipeline for the specified application
attempt id.
|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceInit, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic AMRMProxyService(Context nmContext, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher)
nmContext - dispatcher - protected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterResponse registerApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest request)
throws org.apache.hadoop.yarn.exceptions.YarnException,
IOException
registerApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
throws org.apache.hadoop.yarn.exceptions.YarnException,
IOException
finishApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
throws org.apache.hadoop.yarn.exceptions.YarnException,
IOException
allocate in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionIOExceptionpublic void processApplicationStartRequest(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest request)
throws IOException,
org.apache.hadoop.yarn.exceptions.YarnException
request - - encapsulates information for starting an AMIOExceptionorg.apache.hadoop.yarn.exceptions.YarnExceptionprotected void initializePipeline(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
String user,
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> amrmToken,
org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> localToken)
applicationAttemptId - user - amrmToken - protected void stopApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId - protected Map<org.apache.hadoop.yarn.api.records.ApplicationId,AMRMProxyService.RequestInterceptorChainWrapper> getPipelines()
protected RequestInterceptor createRequestInterceptorChain()
@InterfaceAudience.Private public InetSocketAddress getBindAddress()
@InterfaceAudience.Private public AMRMProxyTokenSecretManager getSecretManager()
Copyright © 2017 Apache Software Foundation. All Rights Reserved.