Skip to content

Commit 420fbba

Browse files
dbistpetersomogyi
authored andcommitted
HBASE-21536 Fix completebulkload usage instructions
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
1 parent 0e79e70 commit 420fbba

File tree

3 files changed

+41
-35
lines changed

3 files changed

+41
-35
lines changed

bin/hbase

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -91,35 +91,36 @@ if [ $# = 0 ]; then
9191
echo ""
9292
echo "Commands:"
9393
echo "Some commands take arguments. Pass no args or -h for usage."
94-
echo " shell Run the HBase shell"
95-
echo " hbck Run the HBase 'fsck' tool. Defaults read-only hbck1."
96-
echo " Pass '-j /path/to/HBCK2.jar' to run hbase-2.x HBCK2."
97-
echo " snapshot Tool for managing snapshots"
94+
echo " shell Run the HBase shell"
95+
echo " hbck Run the HBase 'fsck' tool. Defaults read-only hbck1."
96+
echo " Pass '-j /path/to/HBCK2.jar' to run hbase-2.x HBCK2."
97+
echo " snapshot Tool for managing snapshots"
9898
if [ "${in_omnibus_tarball}" = "true" ]; then
99-
echo " wal Write-ahead-log analyzer"
100-
echo " hfile Store file analyzer"
101-
echo " zkcli Run the ZooKeeper shell"
102-
echo " master Run an HBase HMaster node"
103-
echo " regionserver Run an HBase HRegionServer node"
104-
echo " zookeeper Run a ZooKeeper server"
105-
echo " rest Run an HBase REST server"
106-
echo " thrift Run the HBase Thrift server"
107-
echo " thrift2 Run the HBase Thrift2 server"
108-
echo " clean Run the HBase clean up script"
99+
echo " wal Write-ahead-log analyzer"
100+
echo " hfile Store file analyzer"
101+
echo " zkcli Run the ZooKeeper shell"
102+
echo " master Run an HBase HMaster node"
103+
echo " regionserver Run an HBase HRegionServer node"
104+
echo " zookeeper Run a ZooKeeper server"
105+
echo " rest Run an HBase REST server"
106+
echo " thrift Run the HBase Thrift server"
107+
echo " thrift2 Run the HBase Thrift2 server"
108+
echo " clean Run the HBase clean up script"
109109
fi
110-
echo " classpath Dump hbase CLASSPATH"
111-
echo " mapredcp Dump CLASSPATH entries required by mapreduce"
112-
echo " pe Run PerformanceEvaluation"
113-
echo " ltt Run LoadTestTool"
114-
echo " canary Run the Canary tool"
115-
echo " version Print the version"
116-
echo " backup Backup tables for recovery"
117-
echo " restore Restore tables from existing backup image"
118-
echo " regionsplitter Run RegionSplitter tool"
119-
echo " rowcounter Run RowCounter tool"
120-
echo " cellcounter Run CellCounter tool"
121-
echo " pre-upgrade Run Pre-Upgrade validator tool"
122-
echo " CLASSNAME Run the class named CLASSNAME"
110+
echo " classpath Dump hbase CLASSPATH"
111+
echo " mapredcp Dump CLASSPATH entries required by mapreduce"
112+
echo " pe Run PerformanceEvaluation"
113+
echo " ltt Run LoadTestTool"
114+
echo " canary Run the Canary tool"
115+
echo " version Print the version"
116+
echo " backup Backup tables for recovery"
117+
echo " restore Restore tables from existing backup image"
118+
echo " completebulkload Run BulkLoadHFiles tool"
119+
echo " regionsplitter Run RegionSplitter tool"
120+
echo " rowcounter Run RowCounter tool"
121+
echo " cellcounter Run CellCounter tool"
122+
echo " pre-upgrade Run Pre-Upgrade validator tool"
123+
echo " CLASSNAME Run the class named CLASSNAME"
123124
exit 1
124125
fi
125126

@@ -645,6 +646,8 @@ elif [ "$COMMAND" = "cellcounter" ] ; then
645646
CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
646647
elif [ "$COMMAND" = "pre-upgrade" ] ; then
647648
CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
649+
elif [ "$COMMAND" = "completebulkload" ] ; then
650+
CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
648651
else
649652
CLASS=$COMMAND
650653
fi

hbase-server/src/main/java/org/apache/hadoop/hbase/tool/LoadIncrementalHFiles.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,16 @@ public LoadIncrementalHFiles(Configuration conf) {
182182
}
183183

184184
private void usage() {
185-
System.err.println("usage: " + NAME + " /path/to/hfileoutputformat-output tablename -loadTable"
186-
+ "\n -D" + CREATE_TABLE_CONF_KEY + "=no - can be used to avoid creation of table by "
187-
+ "this tool\n Note: if you set this to 'no', then the target table must already exist "
188-
+ "in HBase\n -loadTable implies your baseDirectory to store file has a depth of 3 ,you"
189-
+ " must have an existing table\n-D" + IGNORE_UNMATCHED_CF_CONF_KEY + "=yes - can be used "
190-
+ "to ignore unmatched column families\n" +
191-
"\n");
185+
System.err.println("usage: " + "bin/hbase completebulkload <-Dargs> "
186+
+ "</path/to/hfileoutputformat-output> <tablename>\n"
187+
+ "\t-D" + CREATE_TABLE_CONF_KEY + "=no can be used to avoid creation "
188+
+ "of a table by this tool.\n"
189+
+ "\t Note: if you set this to 'no', then target table must already exist.\n"
190+
+ "\t-D" + IGNORE_UNMATCHED_CF_CONF_KEY + "=yes can be used to ignore "
191+
+ "unmatched column families.\n"
192+
+ "\t-loadTable switch implies your baseDirectory to store file has a "
193+
+ "depth of 3, table must exist\n"
194+
+ "\t and -loadTable switch is the last option on the command line.\n\n");
192195
}
193196

194197
/**

src/main/asciidoc/_chapters/ops_mgt.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ $ bin/hbase org.apache.hadoop.hbase.tool.LoadIncrementalHFiles <hdfs://storefile
841841

842842
.Driver
843843
----
844-
HADOOP_CLASSPATH=`${HBASE_HOME}/bin/hbase classpath` ${HADOOP_HOME}/bin/hadoop jar ${HBASE_HOME}/hbase-server-VERSION.jar completebulkload <hdfs://storefileoutput> <tablename>
844+
HADOOP_CLASSPATH=`${HBASE_HOME}/bin/hbase classpath` ${HADOOP_HOME}/bin/hadoop jar ${HBASE_HOME}/hbase-mapreduce-VERSION.jar completebulkload <hdfs://storefileoutput> <tablename>
845845
----
846846

847847
[[completebulkload.warning]]

0 commit comments

Comments
 (0)