public class CredentialShell extends Configured implements Tool
Modifier and Type | Class and Description |
---|---|
static class |
CredentialShell.PasswordReader
To facilitate testing since Console is a final class.
|
Modifier and Type | Field and Description |
---|---|
PrintStream |
err
Allows stderr to be captured if necessary.
|
static String |
NO_VALID_PROVIDERS |
PrintStream |
out
Allows stdout to be captured if necessary.
|
Constructor and Description |
---|
CredentialShell() |
Modifier and Type | Method and Description |
---|---|
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) |
getConf, setConf
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConf, setConf
public static final String NO_VALID_PROVIDERS
public PrintStream out
public PrintStream err
public int run(String[] args) throws Exception
Tool
protected int init(String[] args) throws IOException
% hadoop credential create alias [-provider providerPath] % hadoop credential list [-provider providerPath] % hadoop credential delete alias [-provider providerPath] [-f]
args
- IOException
protected char[] promptForCredential() throws IOException
IOException
public CredentialShell.PasswordReader getPasswordReader()
public void setPasswordReader(CredentialShell.PasswordReader reader)
Copyright © 2018 Apache Software Foundation. All Rights Reserved.