Class ClientToAMTokenIdentifier

java.lang.Object
org.apache.hadoop.security.token.TokenIdentifier
org.apache.hadoop.yarn.security.client.ClientToAMTokenIdentifier
All Implemented Interfaces:
Writable

@Public @Evolving public class ClientToAMTokenIdentifier extends TokenIdentifier
  • Field Details

    • KIND_NAME

      public static final Text KIND_NAME
  • Constructor Details

    • ClientToAMTokenIdentifier

      public ClientToAMTokenIdentifier()
    • ClientToAMTokenIdentifier

      public ClientToAMTokenIdentifier(ApplicationAttemptId id, String client)
  • Method Details

    • getApplicationAttemptID

      public ApplicationAttemptId getApplicationAttemptID()
    • getClientName

      public String getClientName()
    • getProto

      public org.apache.hadoop.yarn.proto.YarnSecurityTokenProtos.ClientToAMTokenIdentifierProto getProto()
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException - any other problem for write.
    • readFields

      public void readFields(DataInput in) throws IOException
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException - any other problem for readFields.
    • getKind

      public Text getKind()
      Description copied from class: TokenIdentifier
      Get the token kind
      Specified by:
      getKind in class TokenIdentifier
      Returns:
      the kind of the token
    • getUser

      public UserGroupInformation getUser()
      Description copied from class: TokenIdentifier
      Get the Ugi with the username encoded in the token identifier
      Specified by:
      getUser in class TokenIdentifier
      Returns:
      the username. null is returned if username in the identifier is empty or null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object