HBASE-14345 Consolidate printUsage in IntegrationTestLoadAndVerify (Reid Chan)
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3c3457c6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3c3457c6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3c3457c6 Branch: refs/heads/hbase-12439 Commit: 3c3457c6c07674db19be392a8ddc1d2de1e0f2c8 Parents: 091a17e Author: Reid <reidddc...@outlook.com> Authored: Sun Aug 7 14:12:30 2016 +0800 Committer: Apekshit Sharma <a...@apache.org> Committed: Wed Aug 10 09:38:46 2016 -0700 ---------------------------------------------------------------------- .../hadoop/hbase/test/IntegrationTestLoadAndVerify.java | 12 +++++++----- .../IntegrationTestWithCellVisibilityLoadAndVerify.java | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/3c3457c6/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java ---------------------------------------------------------------------- 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 d12383d..5b437d4 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,9 +549,11 @@ public void cleanUpCluster() throws Exception { getTestingUtil(getConf()).deleteTable(htd.getTableName()); } - public void usage() { - System.err.println(this.getClass().getSimpleName() - + " [-Doptions] <load|verify|loadAndVerify|search>"); + @Override + public void printUsage() { + printUsage(this.getClass().getSimpleName() + " <options>" + + " [-Doptions] <load|verify|loadAndVerify|search>", "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(" -Dloadmapper.table=<name> Table to write/verify (default autogen)"); @@ -571,7 +573,7 @@ public void cleanUpCluster() throws Exception { String[] args = cmd.getArgs(); if (args == null || args.length < 1) { - usage(); + printUsage(); throw new RuntimeException("Incorrect Number of args."); } toRun = args[0]; @@ -608,7 +610,7 @@ public void cleanUpCluster() throws Exception { } } else { System.err.println("Invalid argument " + toRun); - usage(); + printUsage(); return 1; } http://git-wip-us.apache.org/repos/asf/hbase/blob/3c3457c6/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestWithCellVisibilityLoadAndVerify.java ---------------------------------------------------------------------- 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 abaa481..3cafe9d 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