DelegationTokenFetcher (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.tools, class: DelegationTokenFetcher

Package org.apache.hadoop.hdfs.tools

# Class DelegationTokenFetcher

java.lang.Object
org.apache.hadoop.hdfs.tools.DelegationTokenFetcher

@Private public class DelegationTokenFetcher extends Object
Fetch a DelegationToken from the current Namenode and store it in the specified file.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DelegationTokenFetcher()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `main(String[] args)`
  Command-line interface.
  `static void`
  `main(org.apache.hadoop.conf.Configuration conf, String[] args)`
  Command line interface with a specific configuration.
  `static String`
  `printTokensToString(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tokenFile, boolean verbose)`

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

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

- ## Constructor Details

  - ### DelegationTokenFetcher

    public DelegationTokenFetcher()

- ## Method Details

  - ### main

    public static void main(String[] args) throws Exception
    Command-line interface.
    Parameters:
      `args` - argument list.
    Throws:
      `Exception` - on a failure.
      `org.apache.hadoop.util.ExitUtil.ExitException` - if the command failed and exiting was disabled.

  - ### main

    @VisibleForTesting public static void main(org.apache.hadoop.conf.Configuration conf, String[] args) throws Exception
    Command line interface with a specific configuration. Errors in this operation will call `ExitUtil.terminate(int)` to exit the process.
    Parameters:
      `conf` - configuration to create filesystems with.
      `args` - argument list.
    Throws:
      `Exception` - on a failure.
      `org.apache.hadoop.util.ExitUtil.ExitException` - if the command failed and exiting was disabled.

  - ### printTokensToString

    @VisibleForTesting public static String printTokensToString(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tokenFile, boolean verbose) throws IOException
    Throws:
      `IOException`