Package org.apache.hadoop.hdfs.tools
Class DelegationTokenFetcher
java.lang.Object
org.apache.hadoop.hdfs.tools.DelegationTokenFetcher
Fetch a DelegationToken from the current Namenode and store it in the
specified file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidCommand-line interface.static voidCommand line interface with a specific configuration.static StringprintTokensToString(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path tokenFile, boolean verbose)
-
Constructor Details
-
DelegationTokenFetcher
public DelegationTokenFetcher()
-
-
Method Details
-
main
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 callExitUtil.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
-