DelegationTokenIdentifier (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.security.token.delegation, class: DelegationTokenIdentifier

Package org.apache.hadoop.hdfs.security.token.delegation

# Class DelegationTokenIdentifier

java.lang.Object
org.apache.hadoop.security.token.TokenIdentifier
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier
org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier

All Implemented Interfaces:
  `org.apache.hadoop.io.Writable`

Direct Known Subclasses:
  `DelegationTokenIdentifier.WebHdfsDelegationTokenIdentifier`

@Private public class DelegationTokenIdentifier extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier
A delegation token identifier that is specific to HDFS.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `DelegationTokenIdentifier.SWebHdfsDelegationTokenIdentifier`
  `static class`
  `DelegationTokenIdentifier.WebHdfsDelegationTokenIdentifier`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final org.apache.hadoop.io.Text`
  `HDFS_DELEGATION_KIND`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DelegationTokenIdentifier()`
  Create an empty delegation token identifier for reading into.
  `DelegationTokenIdentifier(org.apache.hadoop.io.Text owner, org.apache.hadoop.io.Text renewer, org.apache.hadoop.io.Text realUser)`
  Create a new delegation token identifier

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `clearCache()`
  `org.apache.hadoop.io.Text`
  `getKind()`
  `org.apache.hadoop.security.UserGroupInformation`
  `getUser()`
  `static String`
  `stringifyToken(org.apache.hadoop.security.token.Token<?> token)`
  `String`
  `toString()`
  `String`
  `toStringStable()`

  ### Methods inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier

  `equals, getIssueDate, getMasterKeyId, getMaxDate, getOwner, getRealUser, getRenewer, getSequenceNumber, hashCode, isEqual, readFields, setIssueDate, setMasterKeyId, setMaxDate, setOwner, setRealUser, setRenewer, setSequenceNumber, write`

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

  `getBytes, getTrackingId`

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

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

- ## Field Details

  - ### HDFS_DELEGATION_KIND

    public static final org.apache.hadoop.io.Text HDFS_DELEGATION_KIND

- ## Constructor Details

  - ### DelegationTokenIdentifier

    public DelegationTokenIdentifier()
    Create an empty delegation token identifier for reading into.

  - ### DelegationTokenIdentifier

    public DelegationTokenIdentifier(org.apache.hadoop.io.Text owner, org.apache.hadoop.io.Text renewer, org.apache.hadoop.io.Text realUser)
    Create a new delegation token identifier
    Parameters:
      `owner` - the effective username of the token owner
      `renewer` - the username of the renewer
      `realUser` - the real username of the token owner

- ## Method Details

  - ### clearCache

    @VisibleForTesting public void clearCache()

  - ### getKind

    public org.apache.hadoop.io.Text getKind()
    Specified by:
      `getKind` in class `org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier`

  - ### getUser

    public org.apache.hadoop.security.UserGroupInformation getUser()
    Overrides:
      `getUser` in class `org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier`

  - ### toStringStable

    public String toStringStable()
    Overrides:
      `toStringStable` in class `org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier`

  - ### stringifyToken

    public static String stringifyToken(org.apache.hadoop.security.token.Token<?> token) throws IOException
    Returns:
      a string representation of the token
    Throws:
      `IOException`