Package org.apache.accumulo.shell
Class Shell.Command
java.lang.Object
org.apache.accumulo.shell.Shell.Command
- Direct Known Subclasses:
AboutCommand,AddAuthsCommand,AddSplitsCommand,AuthenticateCommand,ClasspathCommand,ClearCommand,CloneTableCommand,ConfigCommand,ConstraintCommand,CreateNamespaceCommand,CreateTableCommand,CreateUserCommand,DebugCommand,DeleteAuthsCommand,DeleteCommand,DeleteIterCommand,DeleteNamespaceCommand,DeleteRowsCommand,DeleteScanIterCommand,DeleteShellIterCommand,DropUserCommand,DUCommand,ExecfileCommand,ExitCommand,ExportTableCommand,ExtensionCommand,FateCommand,GetAuthsCommand,GetGroupsCommand,GetSplitsCommand,HelpCommand,HiddenCommand,HistoryCommand,ImportDirectoryCommand,ImportTableCommand,InsertCommand,ListBulkCommand,ListCompactionsCommand,ListIterCommand,ListScansCommand,ListShellIterCommand,ListTabletsCommand,MergeCommand,NamespacePermissionsCommand,NamespacesCommand,NoTableCommand,PasswdCommand,PingCommand,RenameNamespaceCommand,RenameTableCommand,ScanCommand,ScriptCommand,SetAuthsCommand,SetGroupsCommand,SetIterCommand,ShellPluginConfigurationCommand,SleepCommand,SystemPermissionsCommand,TableCommand,TableOperation,TablePermissionsCommand,TablesCommand,TraceCommand,UserCommand,UserPermissionsCommand,UsersCommand,WhoAmICommand
- Enclosing class:
- Shell
The Command class represents a command to be run in the shell. It contains the methods to
execute along with some methods to help tab completion, and return the command name, help, and
usage.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringabstract intgetName()org.apache.commons.cli.Optionsfinal org.apache.commons.cli.Optionsabstract intnumArgs()If the number of arguments is not always zero (not including those arguments handled through Options), make sure to override theusage()method.final voidfinal voidvoidregisterCompletion(Token root, Map<Shell.Command.CompletionSet, Set<String>> completion_set) voidregisterCompletionForCommands(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) voidregisterCompletionForNamespaces(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) voidregisterCompletionForTables(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) voidregisterCompletionForUsers(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) voidregisterCompletionGeneral(Token root, Set<String> args, boolean caseSens) usage()
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
registerCompletionGeneral
-
registerCompletionForTables
public void registerCompletionForTables(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) -
registerCompletionForUsers
public void registerCompletionForUsers(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) -
registerCompletionForCommands
public void registerCompletionForCommands(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) -
registerCompletionForNamespaces
public void registerCompletionForNamespaces(Token root, Map<Shell.Command.CompletionSet, Set<String>> completionSet) -
execute
public abstract int execute(String fullCommand, org.apache.commons.cli.CommandLine cl, Shell shellState) throws Exception - Throws:
Exception
-
description
-
numArgs
public abstract int numArgs() -
getName
-
registerCompletion
public void registerCompletion(Token root, Map<Shell.Command.CompletionSet, Set<String>> completion_set) -
printHelp
-
printHelp
-
getOptionsWithHelp
public final org.apache.commons.cli.Options getOptionsWithHelp() -
usage
-
getOptions
public org.apache.commons.cli.Options getOptions()
-