Package org.apache.hadoop.crypto.key
Class KeyShell
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.tools.CommandShell
org.apache.hadoop.crypto.key.KeyShell
- All Implemented Interfaces:
Configurable,Tool
This program is the CLI utility for the KeyProvider facilities in Hadoop.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.tools.CommandShell
CommandShell.SubCommand -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn usage string for the command including any summary of subcommands.protected intParse the command line arguments and initialize the data.static voidmain() entry point for the KeyShell.protected voidMethods inherited from class org.apache.hadoop.tools.CommandShell
getErr, getOut, printShellUsage, run, setErr, setOut, setSubCommandMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
NO_VALID_PROVIDERS
- See Also:
-
-
Constructor Details
-
KeyShell
public KeyShell()
-
-
Method Details
-
init
Parse the command line arguments and initialize the data.% hadoop key create keyName [-size size] [-cipher algorithm] [-provider providerPath] % hadoop key roll keyName [-provider providerPath] % hadoop key list [-provider providerPath] % hadoop key delete keyName [-provider providerPath] [-i] % hadoop key invalidateCache keyName [-provider providerPath]- Specified by:
initin classCommandShell- Parameters:
args- Command line arguments.- Returns:
- 0 on success, 1 on failure.
- Throws:
IOException- raised on errors performing I/O.
-
getCommandUsage
Description copied from class:CommandShellReturn usage string for the command including any summary of subcommands.- Specified by:
getCommandUsagein classCommandShell- Returns:
- command usage.
-
printException
- Overrides:
printExceptionin classCommandShell
-
main
main() entry point for the KeyShell. While strictly speaking the return is void, it will System.exit() with a return code: 0 is for success and 1 for failure.- Parameters:
args- Command line arguments.- Throws:
Exception- raised on errors performing I/O.
-