ClientToAMTokenSecretManager (Apache Hadoop YARN Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.security.client, class: ClientToAMTokenSecretManager

Package org.apache.hadoop.yarn.security.client

# Class ClientToAMTokenSecretManager

java.lang.Object
org.apache.hadoop.security.token.SecretManager<ClientToAMTokenIdentifier>
org.apache.hadoop.yarn.security.client.BaseClientToAMTokenSecretManager
org.apache.hadoop.yarn.security.client.ClientToAMTokenSecretManager

@Public @Evolving public class ClientToAMTokenSecretManager extends BaseClientToAMTokenSecretManager
A simple `SecretManager` for AMs to validate Client-RM tokens issued to clients by the RM using the underlying master-key shared by RM to the AMs on their launch. All the methods are called by either Hadoop RPC or YARN, so this class is strictly for the purpose of inherit/extend and register with Hadoop RPC.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager

  `org.apache.hadoop.security.token.SecretManager.InvalidToken`

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.security.token.SecretManager

  `LOG`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ClientToAMTokenSecretManager(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptID, byte[] key)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SecretKey`
  `getMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptID)`
  `byte[]`
  `retrievePassword(ClientToAMTokenIdentifier identifier)`
  `void`
  `setMasterKey(byte[] key)`

  ### Methods inherited from class org.apache.hadoop.yarn.security.client.BaseClientToAMTokenSecretManager

  `createIdentifier, createPassword`

  ### Methods inherited from class org.apache.hadoop.security.token.SecretManager

  `checkAvailableForRead, createPassword, createSecretKey, generateSecret, retriableRetrievePassword, update, validateSecretKeyLength`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ClientToAMTokenSecretManager

    public ClientToAMTokenSecretManager(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptID, byte[] key)

- ## Method Details

  - ### retrievePassword

    public byte[] retrievePassword(ClientToAMTokenIdentifier identifier) throws org.apache.hadoop.security.token.SecretManager.InvalidToken
    Overrides:
      `retrievePassword` in class `BaseClientToAMTokenSecretManager`
    Throws:
      `org.apache.hadoop.security.token.SecretManager.InvalidToken`

  - ### getMasterKey

    public SecretKey getMasterKey(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptID)
    Specified by:
      `getMasterKey` in class `BaseClientToAMTokenSecretManager`

  - ### setMasterKey

    public void setMasterKey(byte[] key)