org.apache.hadoop.yarn.api.records

## Class NMToken

- java.lang.Object
- - org.apache.hadoop.yarn.api.records.NMToken

-     @InterfaceAudience.Public
       @InterfaceStability.Stable
      public abstract class NMToken
      extends Object

  The NMToken is used for authenticating communication with `NodeManager`

  It is issued by `ResourceMananger` when `ApplicationMaster` negotiates resource with `ResourceManager` and validated on `NodeManager` side.

  See Also:
    `AllocateResponse.getNMTokens()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NMToken()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `abstract NodeId` | `getNodeId()` Get the `NodeId` of the `NodeManager` for which the NMToken is used to authenticate.
    `abstract Token` | `getToken()` Get the `Token` used for authenticating with `NodeManager`
    `int` | `hashCode()`
    `abstract void` | `setNodeId(NodeId nodeId)`
    `abstract void` | `setToken(Token token)`

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

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

- - ### Constructor Detail

    - #### NMToken

          public NMToken()

  - ### Method Detail

    - #### getNodeId

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract NodeId getNodeId()

      Get the `NodeId` of the `NodeManager` for which the NMToken is used to authenticate.
      Returns:
        the `NodeId` of the `NodeManager` for which the NMToken is used to authenticate.

    - #### setNodeId

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract void setNodeId(NodeId nodeId)

    - #### getToken

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract Token getToken()

      Get the `Token` used for authenticating with `NodeManager`
      Returns:
        the `Token` used for authenticating with `NodeManager`

    - #### setToken

          @InterfaceAudience.Public
           @InterfaceStability.Stable
          public abstract void setToken(Token token)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

Copyright © 2022 Apache Software Foundation. All rights reserved.