voldemort.tools.admin.command
Class AbstractAdminCommand

java.lang.Object
  extended by voldemort.tools.admin.command.AbstractAdminCommand
Direct Known Subclasses:
AdminCommand, AdminCommandAsyncJob, AdminCommandAsyncJob.SubCommandAsyncJobList, AdminCommandAsyncJob.SubCommandAsyncJobStop, AdminCommandCleanup, AdminCommandCleanup.SubCommandCleanupOrphanedData, AdminCommandCleanup.SubCommandCleanupSlops, AdminCommandCleanup.SubCommandCleanupVectorClocks, AdminCommandDebug, AdminCommandDebug.SubCommandDebugQueryKeys, AdminCommandDebug.SubCommandDebugRoute, AdminCommandMeta, AdminCommandMeta.SubCommandMetaCheck, AdminCommandMeta.SubCommandMetaCheckVersion, AdminCommandMeta.SubCommandMetaClearRebalance, AdminCommandMeta.SubCommandMetaGet, AdminCommandMeta.SubCommandMetaSet, AdminCommandMeta.SubCommandMetaSyncVersion, AdminCommandOther, AdminCommandOther.SubCommandNativeBackup, AdminCommandOther.SubCommandRestoreFromReplica, AdminCommandQuota, AdminCommandQuota.SubCommandQuotaGet, AdminCommandQuota.SubCommandQuotaReserveMemory, AdminCommandQuota.SubCommandQuotaSet, AdminCommandQuota.SubCommandQuotaUnset, AdminCommandStore, AdminCommandStore.SubCommandStoreAdd, AdminCommandStore.SubCommandStoreDelete, AdminCommandStore.SubCommandStoreRollbackReadOnly, AdminCommandStore.SubCommandStoreTruncatePartition, AdminCommandStore.SubCommandStoreTruncateStore, AdminCommandStream, AdminCommandStream.SubCommandStreamFetchEntries, AdminCommandStream.SubCommandStreamFetchKeys, AdminCommandStream.SubCommandStreamMirror, AdminCommandStream.SubCommandStreamUpdateEntries

public abstract class AbstractAdminCommand
extends java.lang.Object

Abstract class that defines admin commands


Constructor Summary
AbstractAdminCommand()
           
 
Method Summary
static void executeCommand(java.lang.String[] args)
          Parses command-line and executes command with arguments.
static void executeHelp(java.lang.String[] args, java.io.PrintStream stream)
          Parses command-line and decides what help menu to be printed out.
protected static joptsimple.OptionParser getParser()
          Initializes parser
static void printHelp(java.io.PrintStream stream)
          Prints help menu for command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAdminCommand

public AbstractAdminCommand()
Method Detail

getParser

protected static joptsimple.OptionParser getParser()
                                            throws java.lang.Exception
Initializes parser

Throws:
java.lang.Exception

printHelp

public static void printHelp(java.io.PrintStream stream)
                      throws java.lang.Exception
Prints help menu for command. If not overwritten by inherited classes, it throws exception by default.

Parameters:
args - Array of arguments for this command
Throws:
java.lang.Exception

executeHelp

public static void executeHelp(java.lang.String[] args,
                               java.io.PrintStream stream)
                        throws java.lang.Exception
Parses command-line and decides what help menu to be printed out. If not overwritten by inherited classes, it throws exception by default.

Parameters:
args - Array of arguments for this command
Throws:
java.lang.Exception

executeCommand

public static void executeCommand(java.lang.String[] args)
                           throws java.lang.Exception
Parses command-line and executes command with arguments. If not overwritten by inherited classes, it throws exception by default.

Parameters:
args - Array of arguments for this command
Throws:
java.lang.Exception


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu