java.io.Closeable, java.lang.AutoCloseable, org.apache.hadoop.service.Service, org.apache.hadoop.yarn.api.ApplicationMasterProtocolpublic class AMRMProxyService
extends org.apache.hadoop.service.CompositeService
implements org.apache.hadoop.yarn.api.ApplicationMasterProtocol
| Modifier and Type | Class | Description |
|---|---|---|
static class |
AMRMProxyService.RequestInterceptorChainWrapper |
Private structure for encapsulating RequestInterceptor and
ApplicationAttemptId instances.
|
| Constructor | Description |
|---|---|
AMRMProxyService(Context nmContext,
org.apache.hadoop.yarn.event.AsyncDispatcher dispatcher) |
Creates an instance of the service.
|
| Modifier and Type | Method | 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.
|
java.net.InetSocketAddress |
getBindAddress() |
|
protected java.util.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,
java.lang.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,
java.util.Map<java.lang.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 java.lang.Exception
serviceInit in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionprotected void serviceStart()
throws java.lang.Exception
serviceStart in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionprotected void serviceStop()
throws java.lang.Exception
serviceStop in class org.apache.hadoop.service.CompositeServicejava.lang.Exceptionpublic void recover()
throws java.io.IOException
java.io.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,
java.io.IOException
registerApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterResponse finishApplicationMaster(org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationMasterRequest request)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
finishApplicationMaster in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse allocate(org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest request)
throws org.apache.hadoop.yarn.exceptions.YarnException,
java.io.IOException
allocate in interface org.apache.hadoop.yarn.api.ApplicationMasterProtocolorg.apache.hadoop.yarn.exceptions.YarnExceptionjava.io.IOExceptionpublic void processApplicationStartRequest(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest request)
throws java.io.IOException,
org.apache.hadoop.yarn.exceptions.YarnException
request - - encapsulates information for starting an AMjava.io.IOException - if failsorg.apache.hadoop.yarn.exceptions.YarnException - if failsprotected void initializePipeline(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
java.lang.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,
java.util.Map<java.lang.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 java.util.Map<org.apache.hadoop.yarn.api.records.ApplicationId,AMRMProxyService.RequestInterceptorChainWrapper> getPipelines()
protected RequestInterceptor createRequestInterceptorChain()
@Private public java.net.InetSocketAddress getBindAddress()
@Private public AMRMProxyTokenSecretManager getSecretManager()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.