org.apache.accumulo.core.util.shell
public class Shell extends ShellOptions
Modifier and Type | Class and Description |
---|---|
static class |
Shell.Command
The Command class represents a command to be run in the shell.
|
static class |
Shell.PrintFile |
static interface |
Shell.PrintLine |
static class |
Shell.PrintShell |
Modifier and Type | Field and Description |
---|---|
static String |
CHARSET |
Map<String,Shell.Command> |
commandFactory |
Map<String,Shell.Command[]> |
commandGrouping |
protected String |
execCommand |
protected String |
execFile |
protected int |
exitCode |
protected Instance |
instance |
Map<String,List<IteratorSetting>> |
iteratorProfiles |
static org.apache.log4j.Logger |
log |
static int |
NO_FIXED_ARG_LENGTH_CHECK |
protected jline.ConsoleReader |
reader |
Map<String,List<IteratorSetting>> |
scanIteratorOptions |
protected boolean |
verbose |
helpLongOption, helpOption, tableOption, userOption
Constructor and Description |
---|
Shell() |
Shell(jline.ConsoleReader reader,
PrintWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
checkTableState() |
boolean |
config(String... args)
Configures the shell using the provided options.
|
void |
execCommand(String input,
boolean ignoreAuthTimeout,
boolean echoPrompt) |
Connector |
getConnector() |
String |
getDefaultPrompt() |
boolean |
getExit() |
int |
getExitCode() |
Class<? extends Formatter> |
getFormatter()
Return the formatter for the current table.
|
Class<? extends Formatter> |
getFormatter(String tableName)
Return the formatter for the given table.
|
String |
getPrincipal() |
jline.ConsoleReader |
getReader() |
String |
getTableName() |
AuthenticationToken |
getToken() |
boolean |
hasExited() |
static boolean |
isDebuggingEnabled() |
boolean |
isMasking() |
boolean |
isVerbose() |
static void |
main(String[] args) |
void |
printBinaryRecords(Iterable<Map.Entry<Key,Value>> scanner,
boolean printTimestamps,
boolean paginate) |
void |
printBinaryRecords(Iterable<Map.Entry<Key,Value>> scanner,
boolean printTimestamps,
boolean paginate,
Shell.PrintLine outFile) |
void |
printException(Exception e) |
void |
printInfo() |
void |
printLines(Iterator<String> lines,
boolean paginate) |
void |
printLines(Iterator<String> lines,
boolean paginate,
Shell.PrintLine out) |
void |
printRecords(Iterable<Map.Entry<Key,Value>> scanner,
boolean printTimestamps,
boolean paginate,
Class<? extends Formatter> formatterClass) |
void |
printRecords(Iterable<Map.Entry<Key,Value>> scanner,
boolean printTimestamps,
boolean paginate,
Class<? extends Formatter> formatterClass,
Shell.PrintLine outFile) |
void |
printVerboseInfo() |
String |
readMaskedLine(String prompt,
Character mask) |
static String |
repeat(String s,
int c) |
void |
resetExitCode() |
static void |
setDebugging(boolean debuggingEnabled) |
void |
setExit(boolean exit) |
protected void |
setInstance(org.apache.commons.cli.CommandLine cl) |
void |
setLogErrorsToConsole() |
void |
setTableName(String tableName) |
int |
start() |
void |
updateUser(String principal,
AuthenticationToken token) |
public static final org.apache.log4j.Logger log
public static final String CHARSET
public static final int NO_FIXED_ARG_LENGTH_CHECK
protected int exitCode
protected Instance instance
protected jline.ConsoleReader reader
public Map<String,List<IteratorSetting>> scanIteratorOptions
public Map<String,List<IteratorSetting>> iteratorProfiles
public final Map<String,Shell.Command> commandFactory
public final Map<String,Shell.Command[]> commandGrouping
protected String execFile
protected String execCommand
protected boolean verbose
public Shell() throws IOException
IOException
public Shell(jline.ConsoleReader reader, PrintWriter writer)
public boolean config(String... args)
protected void setInstance(org.apache.commons.cli.CommandLine cl)
public Connector getConnector()
public static void main(String[] args) throws IOException
IOException
public int start() throws IOException
IOException
public void printInfo() throws IOException
IOException
public void printVerboseInfo() throws IOException
IOException
public String getDefaultPrompt()
public void execCommand(String input, boolean ignoreAuthTimeout, boolean echoPrompt) throws IOException
IOException
public final void printLines(Iterator<String> lines, boolean paginate) throws IOException
IOException
public final void printLines(Iterator<String> lines, boolean paginate, Shell.PrintLine out) throws IOException
IOException
public final void printRecords(Iterable<Map.Entry<Key,Value>> scanner, boolean printTimestamps, boolean paginate, Class<? extends Formatter> formatterClass, Shell.PrintLine outFile) throws IOException
IOException
public final void printRecords(Iterable<Map.Entry<Key,Value>> scanner, boolean printTimestamps, boolean paginate, Class<? extends Formatter> formatterClass) throws IOException
IOException
public final void printBinaryRecords(Iterable<Map.Entry<Key,Value>> scanner, boolean printTimestamps, boolean paginate, Shell.PrintLine outFile) throws IOException
IOException
public final void printBinaryRecords(Iterable<Map.Entry<Key,Value>> scanner, boolean printTimestamps, boolean paginate) throws IOException
IOException
public void checkTableState()
public final void printException(Exception e)
public static final void setDebugging(boolean debuggingEnabled)
public static final boolean isDebuggingEnabled()
public int getExitCode()
public void resetExitCode()
public void setExit(boolean exit)
public boolean getExit()
public boolean isVerbose()
public void setTableName(String tableName)
public String getTableName()
public jline.ConsoleReader getReader()
public void updateUser(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException
public String getPrincipal()
public AuthenticationToken getToken()
public Class<? extends Formatter> getFormatter()
public Class<? extends Formatter> getFormatter(String tableName)
tableName
- the table namepublic void setLogErrorsToConsole()
public String readMaskedLine(String prompt, Character mask) throws IOException
IOException
public boolean isMasking()
public boolean hasExited()
Copyright © 2015 Apache Accumulo Project. All Rights Reserved.