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

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

# Class DelegationTokenSelector

java.lang.Object
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSelector<DelegationTokenIdentifier>
org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSelector

All Implemented Interfaces:
  `org.apache.hadoop.security.token.TokenSelector<DelegationTokenIdentifier>`

@Private public class DelegationTokenSelector extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSelector<DelegationTokenIdentifier>
A delegation token that is specialized for HDFS

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `SERVICE_NAME_KEY`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DelegationTokenSelector()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.apache.hadoop.security.token.Token<DelegationTokenIdentifier>`
  `selectToken(URI nnUri, Collection<org.apache.hadoop.security.token.Token<?>> tokens, org.apache.hadoop.conf.Configuration conf)`
  Select the delegation token for hdfs.

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

  `selectToken`

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

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

- ## Field Details

  - ### SERVICE_NAME_KEY

    public static final String SERVICE_NAME_KEY
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DelegationTokenSelector

    public DelegationTokenSelector()

- ## Method Details

  - ### selectToken

    public org.apache.hadoop.security.token.Token<DelegationTokenIdentifier> selectToken(URI nnUri, Collection<org.apache.hadoop.security.token.Token<?>> tokens, org.apache.hadoop.conf.Configuration conf)
    Select the delegation token for hdfs. The port will be rewritten to the port of hdfs.service.host_$nnAddr, or the default rpc namenode port. This method should only be called by non-hdfs filesystems that do not use the rpc port to acquire tokens. Ex. webhdfs
    Parameters:
      `nnUri` - of the remote namenode
      `tokens` - as a collection
      `conf` - hadoop configuration
    Returns:
      Token