hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1173763 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
Date Wed, 21 Sep 2011 17:07:39 GMT
Author: stack
Date: Wed Sep 21 17:07:38 2011
New Revision: 1173763

URL: http://svn.apache.org/viewvc?rev=1173763&view=rev
Log:
HBASE-4453 TestReplication failing up on builds.a.o because already running zk with new format
root servername

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1173763&r1=1173762&r2=1173763&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Sep 21 17:07:38 2011
@@ -616,6 +616,8 @@ Release 0.90.5 - Unreleased
    HBASE-4238  CatalogJanitor can clear a daughter that split before
                processing its parent
    HBASE-4445  Not passing --config when checking if distributed mode or not
+   HBASE-4453  TestReplication failing up on builds.a.o because already
+               running zk with new format root servername
 
   IMPROVEMENT
    HBASE-4205  Enhance HTable javadoc (Eric Charles)

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java?rev=1173763&r1=1173762&r2=1173763&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java Wed Sep
21 17:07:38 2011
@@ -77,7 +77,7 @@ public class TestHBaseTestingUtility {
    * @throws Exception
    */
   @Test (timeout=180000)
-  public void multiClusters() throws Exception {
+  public void testMultiClusters() throws Exception {
     // Create three clusters
 
     // Cluster 1.
@@ -89,11 +89,17 @@ public class TestHBaseTestingUtility {
     // Cluster 2
     HBaseTestingUtility htu2 = new HBaseTestingUtility();
     htu2.getConfiguration().set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/2");
+    htu2.getConfiguration().set("hbase.zookeeper.property.clientPort",
+      htu1.getConfiguration().get("hbase.zookeeper.property.clientPort", "-1"));
     htu2.setZkCluster(htu1.getZkCluster());
 
-    // Cluster 3.
+    // Cluster 3; seed it with the conf from htu1 so we pickup the 'right'
+    // zk cluster config; it is set back into the config. as part of the
+    // start of minizkcluster.
     HBaseTestingUtility htu3 = new HBaseTestingUtility();
     htu3.getConfiguration().set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/3");
+    htu3.getConfiguration().set("hbase.zookeeper.property.clientPort",
+      htu1.getConfiguration().get("hbase.zookeeper.property.clientPort", "-1"));
     htu3.setZkCluster(htu1.getZkCluster());
 
     try {
@@ -210,4 +216,4 @@ public class TestHBaseTestingUtility {
     assertTrue(fs.mkdirs(testdir));
     assertTrue(this.hbt.cleanupTestDir());
   }
-}
\ No newline at end of file
+}

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java?rev=1173763&r1=1173762&r2=1173763&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java Wed
Sep 21 17:07:38 2011
@@ -104,11 +104,15 @@ public class TestReplication {
     utility1 = new HBaseTestingUtility(conf1);
     utility1.startMiniZKCluster();
     MiniZooKeeperCluster miniZK = utility1.getZkCluster();
+    // Have to reget conf1 in case zk cluster location different
+    // than default
+    conf1 = utility1.getConfiguration();
     zkw1 = new ZooKeeperWatcher(conf1, "cluster1", null, true);
     admin = new ReplicationAdmin(conf1);
     LOG.info("Setup first Zk");
 
-    conf2 = HBaseConfiguration.create();
+    // Base conf2 on conf1 so it gets the right zk cluster.
+    conf2 = HBaseConfiguration.create(conf1);
     conf2.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/2");
     conf2.setInt("hbase.client.retries.number", 6);
     conf2.setBoolean(HConstants.REPLICATION_ENABLE_KEY, true);



Mime
View raw message