dtutil

A utility to fetch and manage Hadoop delegation tokens inside credentials files.

It’s intended to replace the simpler command fetchdt. There are multiple subcommands, each with their own flags and options.

For every subcommand that writes out to a file, the -format option specifies the internal format to use . java is the legacy format that matches fetchdt. The default is protobuf.

For every subcommand that connects to service, convenience flags are provided to specify a Kerberos principal name and a keytab file to use for authentication.

The usage is as follows:

$ hadoop dtutil [-keytab keytab_file -principal principal_name ] subcommand [-format (java|protobuf)] [-alias alias ] [-renewer renewer ] filename…
Arguments

print [-alias alias ] filename [ filename2 …​]

Prints out the fields in the tokens contained in filename (and filename2 …). If alias is specified, prints only tokens matching alias. Otherwise, prints all tokens

get URL [-service scheme ] [-format (java|protobuf)] [-alias alias] [-renewer renewer ] filename | filename [ filename2 …​]

Fetches tokens from a service at URL and places it in the file.

URL is required and must immediately follow get. URL is the service URL, e.g. hdfs://localhost:9000. The alias argument will overwrite the service field in the token.

It’s intended for hosts that have external and internal names, for example firewall.com:14000. The filename argument should come last and is the name of the token file. It will be created if it does not exist. Otherwise, token(s) are added to existing file.

The -service flag should only be used with URLs that start with "http" or "https". The following are equivalent: hdfs://localhost:9000/ and http://localhost:9000 -service hdfs

append [-format (java|protobuf)] filename filename2 [ filename3 …​]

Appends the contents of the first N files to the last file. When tokens with common service fields are present in multiple files, earlier files' tokens are overwritten. Thus, tokens present in the last file are always preserved

remove -alias alias [-format (java|protobuf)] filename [ filename2 …​]

From each file specified, removes the tokens matching alias and writes out each file using the specified format. The alias argument must be specified

cancel -alias alias [-format (java|protobuf)] filename [ filename2 …​]

Identical to remove, except the tokens are also cancelled using the service specified in the token object. The alias argument must be specified

renew -alias alias [-format (java|protobuf)] filename [ filename2 …​]

For each file specified, renews the tokens matching alias and writes out each file using specified format. The alias argument must be specified

import base64 [-alias alias ] filename

Imports Base64 token. The alias argument overwrites the service field in the token

Found a mistake? Seleсt text and press Ctrl+Enter to report it