From 19a2f1505d370a591dbcdbcfb543e36827c3783b Mon Sep 17 00:00:00 2001 From: Artem Ervits Date: Wed, 22 May 2019 15:44:06 -0400 Subject: [PATCH] HBASE-22396 Backport HBASE-21536 to branch-1 --- bin/hbase | 47 ++++++++++++---------- .../hbase/mapreduce/LoadIncrementalHFiles.java | 14 ++++--- src/main/asciidoc/_chapters/ops_mgt.adoc | 2 +- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/bin/hbase b/bin/hbase index 4877e47547..f82acb6f2c 100755 --- a/bin/hbase +++ b/bin/hbase @@ -84,28 +84,29 @@ if [ $# = 0 ]; then echo "" echo "Commands:" echo "Some commands take arguments. Pass no args or -h for usage." - echo " shell Run the HBase shell" - echo " hbck Run the hbase 'fsck' tool" - echo " snapshot Tool for managing snapshots" - echo " snapshotinfo Tool for dumping snapshot information" - echo " wal Write-ahead-log analyzer" - echo " hfile Store file analyzer" - echo " zkcli Run the ZooKeeper shell" - echo " upgrade Upgrade hbase" - echo " master Run an HBase HMaster node" - echo " regionserver Run an HBase HRegionServer node" - echo " zookeeper Run a Zookeeper server" - echo " rest Run an HBase REST server" - echo " thrift Run the HBase Thrift server" - echo " thrift2 Run the HBase Thrift2 server" - echo " clean Run the HBase clean up script" - echo " classpath Dump hbase CLASSPATH" - echo " mapredcp Dump CLASSPATH entries required by mapreduce" - echo " pe Run PerformanceEvaluation" - echo " ltt Run LoadTestTool" - echo " canary Run the Canary tool" - echo " version Print the version" - echo " CLASSNAME Run the class named CLASSNAME" + echo " shell Run the HBase shell" + echo " hbck Run the hbase 'fsck' tool" + echo " snapshot Tool for managing snapshots" + echo " snapshotinfo Tool for dumping snapshot information" + echo " wal Write-ahead-log analyzer" + echo " hfile Store file analyzer" + echo " zkcli Run the ZooKeeper shell" + echo " upgrade Upgrade hbase" + echo " master Run an HBase HMaster node" + echo " regionserver Run an HBase HRegionServer node" + echo " zookeeper Run a Zookeeper server" + echo " rest Run an HBase REST server" + echo " thrift Run the HBase Thrift server" + echo " thrift2 Run the HBase Thrift2 server" + echo " clean Run the HBase clean up script" + echo " classpath Dump hbase CLASSPATH" + echo " mapredcp Dump CLASSPATH entries required by mapreduce" + echo " completebulkload Run LoadIncrementalHFiles tool" + echo " pe Run PerformanceEvaluation" + echo " ltt Run LoadTestTool" + echo " canary Run the Canary tool" + echo " version Print the version" + echo " CLASSNAME Run the class named CLASSNAME" exit 1 fi @@ -403,6 +404,8 @@ elif [ "$COMMAND" = "canary" ] ; then HBASE_OPTS="$HBASE_OPTS $HBASE_CANARY_OPTS" elif [ "$COMMAND" = "version" ] ; then CLASS='org.apache.hadoop.hbase.util.VersionInfo' +elif [ "$COMMAND" = "completebulkload" ] ; then + CLASS='org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles' else CLASS=$COMMAND fi diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java index 9d7d80b802..2945214c57 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java @@ -168,12 +168,14 @@ public class LoadIncrementalHFiles extends Configured implements Tool { } private void usage() { - System.err.println("usage: " + NAME + " /path/to/hfileoutputformat-output tablename -loadTable" - + "\n -D" + CREATE_TABLE_CONF_KEY + "=no - can be used to avoid creation of table by " - + "this tool\n Note: if you set this to 'no', then the target table must already exist " - + "in HBase\n -loadTable implies your baseDirectory to store file has a depth of 3 ,you" - + " must have an existing table" - + "\n"); + System.err.println("usage: " + "bin/hbase completebulkload <-Dargs> " + + " \n" + + "\t-D" + CREATE_TABLE_CONF_KEY + "=no can be used to avoid creation " + + "of a table by this tool.\n" + + "\t Note: if you set this to 'no', then target table must already exist.\n" + + "\t-loadTable switch implies your baseDirectory to store file has a " + + "depth of 3, table must exist\n" + + "\t and -loadTable switch is the last option on the command line.\n\n"); } private static interface BulkHFileVisitor { diff --git a/src/main/asciidoc/_chapters/ops_mgt.adoc b/src/main/asciidoc/_chapters/ops_mgt.adoc index 722357e3c4..32934e6463 100644 --- a/src/main/asciidoc/_chapters/ops_mgt.adoc +++ b/src/main/asciidoc/_chapters/ops_mgt.adoc @@ -569,7 +569,7 @@ $ bin/hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles +HADOOP_CLASSPATH=`${HBASE_HOME}/bin/hbase classpath` ${HADOOP_HOME}/bin/hadoop jar ${HBASE_HOME}/hbase-mapreduce-VERSION.jar completebulkload ---- [[completebulkload.warning]] -- 2.16.2