Class KeyShell

All Implemented Interfaces:
Configurable, Tool

public class KeyShell extends CommandShell
This program is the CLI utility for the KeyProvider facilities in Hadoop.
  • Field Details

  • Constructor Details

    • KeyShell

      public KeyShell()
  • Method Details

    • init

      protected int init(String[] args) throws IOException
      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:
      init in class CommandShell
      Parameters:
      args - Command line arguments.
      Returns:
      0 on success, 1 on failure.
      Throws:
      IOException - raised on errors performing I/O.
    • getCommandUsage

      public String getCommandUsage()
      Description copied from class: CommandShell
      Return usage string for the command including any summary of subcommands.
      Specified by:
      getCommandUsage in class CommandShell
      Returns:
      command usage.
    • printException

      protected void printException(Exception e)
      Overrides:
      printException in class CommandShell
    • main

      public static void main(String[] args) throws Exception
      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.