org.apache.accumulo.core.util.shell.commands
public abstract class TableOperation extends Shell.Command
Shell.Command.CompletionSet
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.cli.Option |
optNamespace |
protected org.apache.commons.cli.Option |
optTableName |
protected org.apache.commons.cli.Option |
optTablePattern |
Constructor and Description |
---|
TableOperation() |
Modifier and Type | Method and Description |
---|---|
String |
description() |
protected void |
disableUnflaggedTableOptions() |
protected abstract void |
doTableOp(Shell shellState,
String tableName) |
int |
execute(String fullCommand,
org.apache.commons.cli.CommandLine cl,
Shell shellState) |
protected void |
force() |
org.apache.commons.cli.Options |
getOptions() |
protected void |
noForce() |
int |
numArgs()
If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override the
Shell.Command.usage() method. |
protected void |
pruneTables(String pattern,
Set<String> tables)
Allows implementation to remove certain tables from the set of tables to be operated on.
|
void |
registerCompletion(Token root,
Map<Shell.Command.CompletionSet,Set<String>> special) |
String |
usage() |
getName, getOptionsWithHelp, printHelp, printHelp, registerCompletionForCommands, registerCompletionForNamespaces, registerCompletionForTables, registerCompletionForUsers, registerCompletionGeneral
protected org.apache.commons.cli.Option optTablePattern
protected org.apache.commons.cli.Option optTableName
protected org.apache.commons.cli.Option optNamespace
public int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState) throws Exception
execute
in class Shell.Command
Exception
protected void pruneTables(String pattern, Set<String> tables)
pattern
- The pattern which tables were selected usingtables
- A reference to the Set of tables to be operated onprotected abstract void doTableOp(Shell shellState, String tableName) throws Exception
Exception
public String description()
description
in class Shell.Command
public org.apache.commons.cli.Options getOptions()
getOptions
in class Shell.Command
public int numArgs()
Shell.Command
Shell.Command.usage()
method.
Otherwise, Shell.Command.usage()
does need to be overridden.numArgs
in class Shell.Command
protected void force()
protected void noForce()
protected void disableUnflaggedTableOptions()
public String usage()
usage
in class Shell.Command
public void registerCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> special)
registerCompletion
in class Shell.Command
Copyright © 2011–2015 The Apache Software Foundation. All rights reserved.