org.apache.hadoop.security.alias
Class CredentialShell

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.security.alias.CredentialShell
All Implemented Interfaces:
Configurable, Tool

public class CredentialShell
extends Configured
implements Tool

This program is the CLI utility for the CredentialProvider facilities in Hadoop.


Nested Class Summary
static class CredentialShell.PasswordReader
           
 
Field Summary
 PrintStream err
          allows stderr to be captured if necessary
 PrintStream out
          allows stdout to be captured if necessary
 
Constructor Summary
CredentialShell()
           
 
Method Summary
 CredentialShell.PasswordReader getPasswordReader()
           
protected  int init(String[] args)
          Parse the command line arguments and initialize the data
static void main(String[] args)
          Main program.
protected  char[] promptForCredential()
           
 int run(String[] args)
          Execute the command with the given arguments.
 void setPasswordReader(CredentialShell.PasswordReader reader)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

out

public PrintStream out
allows stdout to be captured if necessary


err

public PrintStream err
allows stderr to be captured if necessary

Constructor Detail

CredentialShell

public CredentialShell()
Method Detail

run

public int run(String[] args)
        throws Exception
Description copied from interface: Tool
Execute the command with the given arguments.

Specified by:
run in interface Tool
Parameters:
args - command specific arguments.
Returns:
exit code.
Throws:
Exception

init

protected int init(String[] args)
            throws IOException
Parse the command line arguments and initialize the data
 % hadoop credential create alias [-provider providerPath]
 % hadoop credential list [-provider providerPath]
 % hadoop credential delete alias [-provider providerPath] [-i]
 

Parameters:
args -
Returns:
0 if the argument(s) were recognized, 1 otherwise
Throws:
IOException

promptForCredential

protected char[] promptForCredential()
                              throws IOException
Throws:
IOException

getPasswordReader

public CredentialShell.PasswordReader getPasswordReader()

setPasswordReader

public void setPasswordReader(CredentialShell.PasswordReader reader)

main

public static void main(String[] args)
                 throws Exception
Main program.

Parameters:
args - Command line arguments
Throws:
Exception


Copyright © 2014 Apache Software Foundation. All Rights Reserved.