Class AMRMProxyApplicationContextImpl

java.lang.Object
org.apache.hadoop.yarn.server.nodemanager.amrmproxy.AMRMProxyApplicationContextImpl
All Implemented Interfaces:
AMRMProxyApplicationContext

public class AMRMProxyApplicationContextImpl extends Object implements AMRMProxyApplicationContext
Encapsulates the information about one application that is needed by the request interceptors.
  • Constructor Summary

    Constructors
    Constructor
    Description
    AMRMProxyApplicationContextImpl(Context nmContext, org.apache.hadoop.conf.Configuration conf, 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, org.apache.hadoop.security.Credentials credentials, org.apache.hadoop.registry.client.api.RegistryOperations registry)
    Create an instance of the AMRMProxyApplicationContext.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>
    Gets the application's AMRMToken that is issued by the RM.
    org.apache.hadoop.yarn.api.records.ApplicationAttemptId
    Gets the application attempt identifier.
    org.apache.hadoop.conf.Configuration
    Gets the configuration object instance.
    org.apache.hadoop.security.Credentials
    Gets the credentials of this application.
    org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier>
    Gets the application's local AMRMToken issued by the proxy service.
    int
     
    Gets the NMContext object.
    org.apache.hadoop.registry.client.api.RegistryOperations
    Gets the registry client.
    Gets the application submitter.
    boolean
    setAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> amrmToken)
    Sets the application's AMRMToken.
    void
    setLocalAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> localToken)
    Sets the application's AMRMToken.

    Methods inherited from class java.lang.Object

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

    • AMRMProxyApplicationContextImpl

      public AMRMProxyApplicationContextImpl(Context nmContext, org.apache.hadoop.conf.Configuration conf, 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, org.apache.hadoop.security.Credentials credentials, org.apache.hadoop.registry.client.api.RegistryOperations registry)
      Create an instance of the AMRMProxyApplicationContext.
      Parameters:
      nmContext - NM context
      conf - configuration
      applicationAttemptId - attempt id
      user - user name of the application
      amrmToken - amrmToken issued by RM
      localToken - amrmToken issued by AMRMProxy
      credentials - application credentials
      registry - Yarn Registry client
  • Method Details

    • getConf

      public org.apache.hadoop.conf.Configuration getConf()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the configuration object instance.
      Specified by:
      getConf in interface AMRMProxyApplicationContext
      Returns:
      the configuration object.
    • getApplicationAttemptId

      public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the application attempt identifier.
      Specified by:
      getApplicationAttemptId in interface AMRMProxyApplicationContext
      Returns:
      the application attempt identifier.
    • getUser

      public String getUser()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the application submitter.
      Specified by:
      getUser in interface AMRMProxyApplicationContext
      Returns:
      the application submitter
    • getAMRMToken

      public org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getAMRMToken()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the application's AMRMToken that is issued by the RM.
      Specified by:
      getAMRMToken in interface AMRMProxyApplicationContext
      Returns:
      the application's AMRMToken that is issued by the RM.
    • setAMRMToken

      public boolean setAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> amrmToken)
      Sets the application's AMRMToken.
      Parameters:
      amrmToken - the new amrmToken from RM
      Returns:
      whether the saved token is updated to a different value
    • getLocalAMRMToken

      public org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> getLocalAMRMToken()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the application's local AMRMToken issued by the proxy service.
      Specified by:
      getLocalAMRMToken in interface AMRMProxyApplicationContext
      Returns:
      the application's local AMRMToken issued by the proxy service.
    • setLocalAMRMToken

      public void setLocalAMRMToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.yarn.security.AMRMTokenIdentifier> localToken)
      Sets the application's AMRMToken.
      Parameters:
      localToken - amrmToken issued by AMRMProxy
    • getLocalAMRMTokenKeyId

      @Private public int getLocalAMRMTokenKeyId()
    • getNMContext

      public Context getNMContext()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the NMContext object.
      Specified by:
      getNMContext in interface AMRMProxyApplicationContext
      Returns:
      the NMContext.
    • getCredentials

      public org.apache.hadoop.security.Credentials getCredentials()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the credentials of this application.
      Specified by:
      getCredentials in interface AMRMProxyApplicationContext
      Returns:
      the credentials.
    • getRegistryClient

      public org.apache.hadoop.registry.client.api.RegistryOperations getRegistryClient()
      Description copied from interface: AMRMProxyApplicationContext
      Gets the registry client.
      Specified by:
      getRegistryClient in interface AMRMProxyApplicationContext
      Returns:
      the registry.