org.apache.hadoop.yarn.server.security

## Class BaseNMTokenSecretManager

- java.lang.Object
- - org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>
  - - org.apache.hadoop.yarn.server.security.BaseNMTokenSecretManager

-     public class BaseNMTokenSecretManager
      extends org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>

- - ### 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
    Modifier and Type | Field and Description
    --- | ---
    `protected MasterKeyData` | `currentMasterKey`
    `protected Lock` | `readLock`
    `protected ReadWriteLock` | `readWriteLock`
    `protected int` | `serialNo`
    `protected Lock` | `writeLock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseNMTokenSecretManager()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.hadoop.yarn.security.NMTokenIdentifier` | `createIdentifier()` It is required for RPC
    `protected MasterKeyData` | `createNewMasterKey()`
    `org.apache.hadoop.yarn.api.records.Token` | `createNMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId, org.apache.hadoop.yarn.api.records.NodeId nodeId, String applicationSubmitter)` Helper function for creating NMTokens.
    `protected byte[]` | `createPassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)`
    `MasterKey` | `getCurrentKey()`
    `static org.apache.hadoop.yarn.api.records.Token` | `newInstance(byte[] password, org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)`
    `byte[]` | `retrievePassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)`
    `protected byte[]` | `retrivePasswordInternal(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier, MasterKeyData masterKey)`

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

      `checkAvailableForRead, createPassword, createSecretKey, generateSecret, retriableRetrievePassword`

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

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

- - ### Field Detail

    - #### serialNo

          protected int serialNo

    - #### readWriteLock

          protected final ReadWriteLock readWriteLock

    - #### readLock

          protected final Lock readLock

    - #### writeLock

          protected final Lock writeLock

    - #### currentMasterKey

          protected MasterKeyData currentMasterKey

  - ### Constructor Detail

    - #### BaseNMTokenSecretManager

          public BaseNMTokenSecretManager()

  - ### Method Detail

    - #### createNewMasterKey

          protected MasterKeyData createNewMasterKey()

    - #### getCurrentKey

          @InterfaceAudience.Private
          public MasterKey getCurrentKey()

    - #### createPassword

          protected byte[] createPassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)

      Specified by:
        `createPassword` in class `org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>`

    - #### retrievePassword

          public byte[] retrievePassword(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)
                                  throws org.apache.hadoop.security.token.SecretManager.InvalidToken

      Specified by:
        `retrievePassword` in class `org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>`
      Throws:
        `org.apache.hadoop.security.token.SecretManager.InvalidToken`

    - #### retrivePasswordInternal

          protected byte[] retrivePasswordInternal(org.apache.hadoop.yarn.security.NMTokenIdentifier identifier,
                                                   MasterKeyData masterKey)

    - #### createIdentifier

          public org.apache.hadoop.yarn.security.NMTokenIdentifier createIdentifier()

      It is required for RPC
      Specified by:
        `createIdentifier` in class `org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.NMTokenIdentifier>`

    - #### createNMToken

          public org.apache.hadoop.yarn.api.records.Token createNMToken(org.apache.hadoop.yarn.api.records.ApplicationAttemptId applicationAttemptId,
                                                                        org.apache.hadoop.yarn.api.records.NodeId nodeId,
                                                                        String applicationSubmitter)

      Helper function for creating NMTokens.

    - #### newInstance

          public static org.apache.hadoop.yarn.api.records.Token newInstance(byte[] password,
                                                                             org.apache.hadoop.yarn.security.NMTokenIdentifier identifier)

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.