HBASE-12616 We lost the linked list commands in recent usage refactoring
This commit is contained in:
parent
e424d4254e
commit
23382fe625
|
@ -1123,25 +1123,21 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
|
||||||
|
|
||||||
private void usage() {
|
private void usage() {
|
||||||
System.err.println("Usage: " + this.getClass().getSimpleName() + " COMMAND [COMMAND options]");
|
System.err.println("Usage: " + this.getClass().getSimpleName() + " COMMAND [COMMAND options]");
|
||||||
System.err.println(" where COMMAND is one of:");
|
printCommands();
|
||||||
System.err.println("");
|
}
|
||||||
System.err.println(" Generator A map only job that generates data.");
|
|
||||||
System.err.println(" Verify A map reduce job that looks for holes");
|
private void printCommands() {
|
||||||
System.err.println(" Look at the counts after running");
|
System.err.println("Commands:");
|
||||||
System.err.println(" REFERENCED and UNREFERENCED are ok");
|
System.err.println(" Generator Map only job that generates data.");
|
||||||
System.err.println(" any UNDEFINED counts are bad. Do not");
|
System.err.println(" Verify A map reduce job that looks for holes. Look at the counts ");
|
||||||
System.err.println(" run at the same time as the Generator.");
|
System.err.println(" after running. See REFERENCED and UNREFERENCED are ok. Any ");
|
||||||
System.err.println(" Walker A standalong program that starts ");
|
System.err.println(" UNDEFINED counts are bad. Do not run with the Generator.");
|
||||||
System.err.println(" following a linked list and emits");
|
System.err.println(" Walker " +
|
||||||
System.err.println(" timing info.");
|
"Standalong program that starts following a linked list & emits timing info.");
|
||||||
System.err.println(" Print A standalone program that prints nodes");
|
System.err.println(" Print Standalone program that prints nodes in the linked list.");
|
||||||
System.err.println(" in the linked list.");
|
System.err.println(" Delete Standalone program that deletes a·single node.");
|
||||||
System.err.println(" Delete A standalone program that deletes a·");
|
System.err.println(" Loop Program to Loop through Generator and Verify steps");
|
||||||
System.err.println(" single node.");
|
System.err.println(" Clean Program to clean all left over detritus.");
|
||||||
System.err.println(" Loop A program to Loop through Generator and");
|
|
||||||
System.err.println(" Verify steps");
|
|
||||||
System.err.println(" Clean A program to clean all left over detritus.");
|
|
||||||
System.err.println("\t ");
|
|
||||||
System.err.flush();
|
System.err.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1151,7 +1147,9 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
|
||||||
String[] args = cmd.getArgs();
|
String[] args = cmd.getArgs();
|
||||||
//get the class, run with the conf
|
//get the class, run with the conf
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
printUsage();
|
printUsage(this.getClass().getSimpleName() +
|
||||||
|
" <general options> COMMAND [<COMMAND options>]", "General options:", "");
|
||||||
|
printCommands();
|
||||||
throw new RuntimeException("Incorrect Number of args.");
|
throw new RuntimeException("Incorrect Number of args.");
|
||||||
}
|
}
|
||||||
toRun = args[0];
|
toRun = args[0];
|
||||||
|
@ -1164,19 +1162,19 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase {
|
||||||
Tool tool = null;
|
Tool tool = null;
|
||||||
if (toRun.equals("Generator")) {
|
if (toRun.equals("Generator")) {
|
||||||
tool = new Generator();
|
tool = new Generator();
|
||||||
} else if (toRun.equals("Verify")) {
|
} else if (toRun.equalsIgnoreCase("Verify")) {
|
||||||
tool = new Verify();
|
tool = new Verify();
|
||||||
} else if (toRun.equals("Loop")) {
|
} else if (toRun.equalsIgnoreCase("Loop")) {
|
||||||
Loop loop = new Loop();
|
Loop loop = new Loop();
|
||||||
loop.it = this;
|
loop.it = this;
|
||||||
tool = loop;
|
tool = loop;
|
||||||
} else if (toRun.equals("Walker")) {
|
} else if (toRun.equalsIgnoreCase("Walker")) {
|
||||||
tool = new Walker();
|
tool = new Walker();
|
||||||
} else if (toRun.equals("Print")) {
|
} else if (toRun.equalsIgnoreCase("Print")) {
|
||||||
tool = new Print();
|
tool = new Print();
|
||||||
} else if (toRun.equals("Delete")) {
|
} else if (toRun.equalsIgnoreCase("Delete")) {
|
||||||
tool = new Delete();
|
tool = new Delete();
|
||||||
} else if (toRun.equals("Clean")) {
|
} else if (toRun.equalsIgnoreCase("Clean")) {
|
||||||
tool = new Clean();
|
tool = new Clean();
|
||||||
} else {
|
} else {
|
||||||
usage();
|
usage();
|
||||||
|
|
|
@ -136,14 +136,14 @@ public abstract class AbstractHBaseTool implements Tool {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void printUsage() {
|
protected void printUsage() {
|
||||||
HelpFormatter helpFormatter = new HelpFormatter();
|
printUsage("bin/hbase " + getClass().getName() + " <options>", "Options:", "");
|
||||||
helpFormatter.setWidth(80);
|
}
|
||||||
String usageHeader = "Options:";
|
|
||||||
String usageFooter = "";
|
|
||||||
String usageStr = "bin/hbase " + getClass().getName() + " <options>";
|
|
||||||
|
|
||||||
helpFormatter.printHelp(usageStr, usageHeader, options,
|
protected void printUsage(final String usageStr, final String usageHeader,
|
||||||
usageFooter);
|
final String usageFooter) {
|
||||||
|
HelpFormatter helpFormatter = new HelpFormatter();
|
||||||
|
helpFormatter.setWidth(120);
|
||||||
|
helpFormatter.printHelp(usageStr, usageHeader, options, usageFooter);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addRequiredOptWithArg(String opt, String description) {
|
protected void addRequiredOptWithArg(String opt, String description) {
|
||||||
|
|
Loading…
Reference in New Issue