HBASE-10364 Allow configuration option for parent znode in LoadTestTool
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1558941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4567415008
commit
5f3e90573d
|
@ -127,6 +127,7 @@ public class LoadTestTool extends AbstractHBaseTool {
|
|||
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 AbstractHBaseTool {
|
|||
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 AbstractHBaseTool {
|
|||
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");
|
||||
|
|
Loading…
Reference in New Issue