Class TableOperation
- java.lang.Object
-
- org.apache.accumulo.shell.Shell.Command
-
- org.apache.accumulo.shell.commands.TableOperation
-
- Direct Known Subclasses:
CompactCommand,DeleteTableCommand,FlushCommand,GrantCommand,OfflineCommand,OnlineCommand,RevokeCommand,SummariesCommand
public abstract class TableOperation extends Shell.Command
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.shell.Shell.Command
Shell.Command.CompletionSet
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.cli.OptionoptNamespaceprotected org.apache.commons.cli.OptionoptTableNameprotected org.apache.commons.cli.OptionoptTablePattern
-
Constructor Summary
Constructors Constructor Description TableOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringdescription()protected voiddisableUnflaggedTableOptions()protected abstract voiddoTableOp(Shell shellState, String tableName)intexecute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState)protected voidforce()org.apache.commons.cli.OptionsgetOptions()protected voidnoForce()intnumArgs()If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override theShell.Command.usage()method.protected voidpruneTables(Set<String> tables)Allows implementation to remove certain tables from the set of tables to be operated on.voidregisterCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> special)Stringusage()-
Methods inherited from class org.apache.accumulo.shell.Shell.Command
getName, getOptionsWithHelp, printHelp, printHelp, registerCompletionForCommands, registerCompletionForNamespaces, registerCompletionForTables, registerCompletionForUsers, registerCompletionGeneral
-
-
-
-
Method Detail
-
execute
public int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState) throws Exception
- Specified by:
executein classShell.Command- Throws:
Exception
-
pruneTables
protected void pruneTables(Set<String> tables)
Allows implementation to remove certain tables from the set of tables to be operated on.- Parameters:
tables- A reference to the Set of tables to be operated on
-
doTableOp
protected abstract void doTableOp(Shell shellState, String tableName) throws Exception
- Throws:
Exception
-
description
public String description()
- Specified by:
descriptionin classShell.Command
-
getOptions
public org.apache.commons.cli.Options getOptions()
- Overrides:
getOptionsin classShell.Command
-
numArgs
public int numArgs()
Description copied from class:Shell.CommandIf the number of arguments is not always zero (not including those arguments handled through Options), make sure to override theShell.Command.usage()method. Otherwise,Shell.Command.usage()does need to be overridden.- Specified by:
numArgsin classShell.Command
-
force
protected void force()
-
noForce
protected void noForce()
-
disableUnflaggedTableOptions
protected void disableUnflaggedTableOptions()
-
usage
public String usage()
- Overrides:
usagein classShell.Command
-
registerCompletion
public void registerCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> special)
- Overrides:
registerCompletionin classShell.Command
-
-