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/23 21:38:53 UTC
svn commit: r1560803 -
/hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java
Author: tedyu
Date: Thu Jan 23 20:38:53 2014
New Revision: 1560803
URL: http://svn.apache.org/r1560803
Log:
HBASE-10409 Allow config options related to zookeeper to be passed to IntegrationTestsDriver (Ted Yu)
Modified:
hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java
Modified: hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java?rev=1560803&r1=1560802&r2=1560803&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java (original)
+++ hbase/branches/0.98/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestsDriver.java Thu Jan 23 20:38:53 2014
@@ -39,6 +39,9 @@ import org.junit.runner.Result;
public class IntegrationTestsDriver extends AbstractHBaseTool {
private static final String SHORT_REGEX_ARG = "r";
private static final String LONG_REGEX_ARG = "regex";
+ protected static final String OPT_ZK_QUORUM = "zk";
+ protected static final String OPT_ZK_PARENT_NODE = "zk_root";
+
private static final Log LOG = LogFactory.getLog(IntegrationTestsDriver.class);
private IntegrationTestFilter intTestFilter = new IntegrationTestFilter();
@@ -73,10 +76,19 @@ public class IntegrationTestsDriver exte
"Java regex to use selecting tests to run: e.g. .*TestBig.*" +
" will select all tests that include TestBig in their name. Default: " +
".*IntegrationTest.*");
+ 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");
}
@Override
protected void processOptions(CommandLine cmd) {
+ 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));
+ }
String testFilterString = cmd.getOptionValue(SHORT_REGEX_ARG, null);
if (testFilterString != null) {
intTestFilter.setPattern(testFilterString);