diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java index e279dfb..b3370a7 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java @@ -549,11 +549,13 @@ public void cleanUpCluster() throws Exception { getTestingUtil(getConf()).deleteTable(htd.getTableName()); } - public void usage() { - System.err.println(this.getClass().getSimpleName() - + " [-Doptions] "); + @Override + public void printUsage() { + printUsage(this.getClass().getSimpleName() + " " + + " [-Doptions] ", "Options", ""); + System.err.println(""); System.err.println(" Loads a table with row dependencies and verifies the dependency chains"); - System.err.println("Options"); + System.err.println("Doptions"); System.err.println(" -Dloadmapper.table= Table to write/verify (default autogen)"); System.err.println(" -Dloadmapper.backrefs= Number of backreferences per row (default 50)"); System.err.println(" -Dloadmapper.num_to_write= Number of rows per mapper (default 100,000 per mapper)"); @@ -571,8 +573,8 @@ public void cleanUpCluster() throws Exception { String[] args = cmd.getArgs(); if (args == null || args.length < 1) { - usage(); - throw new RuntimeException("Incorrect Number of args."); + printUsage(); + System.exit(EXIT_FAILURE); } toRun = args[0]; if (toRun.equalsIgnoreCase("search")) { @@ -608,7 +610,7 @@ public void cleanUpCluster() throws Exception { } } else { System.err.println("Invalid argument " + toRun); - usage(); + printUsage(); return 1; } diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java index 52a705b..d701d16 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java @@ -347,7 +347,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify extends IntegrationT } @Override - public void usage() { + public void printUsage() { System.err.println(this.getClass().getSimpleName() + " -u usera,userb [-Doptions]"); System.err.println(" Loads a table with cell visibilities and verifies with Authorizations"); System.err.println("Options"); @@ -386,7 +386,7 @@ public class IntegrationTestWithCellVisibilityLoadAndVerify extends IntegrationT protected void processOptions(CommandLine cmd) { List args = cmd.getArgList(); if (args.size() > 0) { - usage(); + printUsage(); throw new RuntimeException("No args expected."); } // We always want loadAndVerify action