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 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