voldemort.tools.admin.command
Class AdminCommandCleanup.SubCommandCleanupOrphanedData

java.lang.Object
  extended by voldemort.tools.admin.command.AbstractAdminCommand
      extended by voldemort.tools.admin.command.AdminCommandCleanup.SubCommandCleanupOrphanedData
Enclosing class:
AdminCommandCleanup

public static class AdminCommandCleanup.SubCommandCleanupOrphanedData
extends AbstractAdminCommand

cleanup orphaned-data command


Constructor Summary
AdminCommandCleanup.SubCommandCleanupOrphanedData()
           
 
Method Summary
static void doCleanupOrphanedData(AdminClient adminClient, java.util.List<java.lang.Integer> nodeIds)
          Removes orphaned data on a single node after rebalancing is done.
static void executeCommand(java.lang.String[] args)
          Parses command-line and removes orphaned data on a single node after rebalancing is done.
protected static joptsimple.OptionParser getParser()
          Initializes parser
static void printHelp(java.io.PrintStream stream)
          Prints help menu for command.
 
Methods inherited from class voldemort.tools.admin.command.AbstractAdminCommand
executeHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminCommandCleanup.SubCommandCleanupOrphanedData

public AdminCommandCleanup.SubCommandCleanupOrphanedData()
Method Detail

getParser

protected static joptsimple.OptionParser getParser()
Initializes parser

Returns:
OptionParser object with all available options

printHelp

public static void printHelp(java.io.PrintStream stream)
                      throws java.io.IOException
Prints help menu for command.

Parameters:
stream - PrintStream object for output
Throws:
java.io.IOException

executeCommand

public static void executeCommand(java.lang.String[] args)
                           throws java.io.IOException
Parses command-line and removes orphaned data on a single node after rebalancing is done. Previously known as "--repair-job".

Parameters:
args - Command-line input
printHelp - Tells whether to print help only or execute command actually
Throws:
java.io.IOException

doCleanupOrphanedData

public static void doCleanupOrphanedData(AdminClient adminClient,
                                         java.util.List<java.lang.Integer> nodeIds)
Removes orphaned data on a single node after rebalancing is done.

Parameters:
adminClient - An instance of AdminClient points to given cluster
nodeIds - Node ids to remove orphaned data on


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