public class AMRMProxyService
extends org.apache.hadoop.service.CompositeService
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 interceptor in the
chain of request interceptor 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 interceptor 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,
Map<String,byte[]> recoveredDataMap,
boolean isRecovery,
org.apache.hadoop.security.Credentials credentials)
Initializes the request interceptor 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.
|
void |
recover()
Recover from NM state store.
|
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 |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
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.
|
addIfService, addService, getServices, removeServiceclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic AMRMProxyService(Context nmContext, org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher)
nmContext - NM contextdispatcher - NM dispatcherprotected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.CompositeServiceExceptionprotected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.CompositeServiceExceptionprotected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.CompositeServiceExceptionpublic void recover()
throws IOException
IOException - if recover failspublic 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 AMIOException - if failsorg.apache.hadoop.yarn.exceptions.YarnException - if failsprotected 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,
Map<String,byte[]> recoveredDataMap,
boolean isRecovery,
org.apache.hadoop.security.Credentials credentials)
applicationAttemptId - attempt iduser - user nameamrmToken - amrmToken issued by RMlocalToken - amrmToken issued by AMRMProxyrecoveredDataMap - the recovered states for AMRMProxy from NMSSisRecovery - whether this is to recover a previously existing pipelineprotected void stopApplication(org.apache.hadoop.yarn.api.records.ApplicationId applicationId)
applicationId - application idprotected 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 © 2008–2024 Apache Software Foundation. All rights reserved.