org.apache.accumulo.core.util.shell.commands
Class TableOperation

java.lang.Object
  extended by org.apache.accumulo.core.util.shell.Shell.Command
      extended by org.apache.accumulo.core.util.shell.commands.TableOperation
Direct Known Subclasses:
CompactCommand, DeleteTableCommand, FlushCommand, GrantCommand, OfflineCommand, OnlineCommand, RevokeCommand

public abstract class TableOperation
extends Shell.Command


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.accumulo.core.util.shell.Shell.Command
Shell.Command.CompletionSet
 
Field Summary
protected  org.apache.commons.cli.Option optTableName
           
protected  org.apache.commons.cli.Option optTablePattern
           
 
Constructor Summary
TableOperation()
           
 
Method Summary
 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.
 void registerCompletion(Token root, Map<Shell.Command.CompletionSet,Set<String>> special)
           
 String usage()
           
 
Methods inherited from class org.apache.accumulo.core.util.shell.Shell.Command
getName, getOptionsWithHelp, printHelp, printHelp, registerCompletionForCommands, registerCompletionForTables, registerCompletionForUsers, registerCompletionGeneral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

optTablePattern

protected org.apache.commons.cli.Option optTablePattern

optTableName

protected org.apache.commons.cli.Option optTableName
Constructor Detail

TableOperation

public TableOperation()
Method Detail

execute

public int execute(String fullCommand,
                   org.apache.commons.cli.CommandLine cl,
                   Shell shellState)
            throws Exception
Specified by:
execute in class Shell.Command
Throws:
Exception

doTableOp

protected abstract void doTableOp(Shell shellState,
                                  String tableName)
                           throws Exception
Throws:
Exception

description

public String description()
Specified by:
description in class Shell.Command

getOptions

public org.apache.commons.cli.Options getOptions()
Overrides:
getOptions in class Shell.Command

numArgs

public int numArgs()
Description copied from class: Shell.Command
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. Otherwise, Shell.Command.usage() does need to be overridden.

Specified by:
numArgs in class Shell.Command

force

protected void force()

noForce

protected void noForce()

disableUnflaggedTableOptions

protected void disableUnflaggedTableOptions()

usage

public String usage()
Overrides:
usage in class Shell.Command

registerCompletion

public void registerCompletion(Token root,
                               Map<Shell.Command.CompletionSet,Set<String>> special)
Overrides:
registerCompletion in class Shell.Command


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.