You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/01/16 23:44:31 UTC
svn commit: r1558941 -
/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
Author: tedyu
Date: Thu Jan 16 22:44:31 2014
New Revision: 1558941
URL: http://svn.apache.org/r1558941
Log:
HBASE-10364 Allow configuration option for parent znode in LoadTestTool
Modified:
hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java?rev=1558941&r1=1558940&r2=1558941&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java Thu Jan 16 22:44:31 2014
@@ -127,6 +127,7 @@ public class LoadTestTool extends Abstra
protected static final String OPT_START_KEY = "start_key";
protected static final String OPT_TABLE_NAME = "tn";
protected static final String OPT_ZK_QUORUM = "zk";
+ protected static final String OPT_ZK_PARENT_NODE = "zk_root";
protected static final String OPT_SKIP_INIT = "skip_init";
protected static final String OPT_INIT_ONLY = "init_only";
private static final String NUM_TABLES = "num_tables";
@@ -251,6 +252,7 @@ public class LoadTestTool extends Abstra
protected void addOptions() {
addOptWithArg(OPT_ZK_QUORUM, "ZK quorum as comma-separated host names " +
"without port numbers");
+ addOptWithArg(OPT_ZK_PARENT_NODE, "name of parent znode in zookeeper");
addOptWithArg(OPT_TABLE_NAME, "The name of the table to read or write");
addOptWithArg(OPT_WRITE, OPT_USAGE_LOAD);
addOptWithArg(OPT_READ, OPT_USAGE_READ);
@@ -431,6 +433,9 @@ public class LoadTestTool extends Abstra
if (cmd.hasOption(OPT_ZK_QUORUM)) {
conf.set(HConstants.ZOOKEEPER_QUORUM, cmd.getOptionValue(OPT_ZK_QUORUM));
}
+ if (cmd.hasOption(OPT_ZK_PARENT_NODE)) {
+ conf.set(HConstants.ZOOKEEPER_ZNODE_PARENT, cmd.getOptionValue(OPT_ZK_PARENT_NODE));
+ }
if (isInitOnly) {
LOG.info("Initializing only; no reads or writes");