Author: stack
Date: Wed Sep 21 17:08:00 2011
New Revision: 1173764
URL: http://svn.apache.org/viewvc?rev=1173764&view=rev
Log:
HBASE-4453 TestReplication failing up on builds.a.o because already running zk
with new format root servername
Modified:
hbase/branches/0.92/CHANGES.txt
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
Modified: hbase/branches/0.92/CHANGES.txt
URL:
http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1173764&r1=1173763&r2=1173764&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Wed Sep 21 17:08:00 2011
@@ -614,6 +614,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/branches/0.92/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java?rev=1173764&r1=1173763&r2=1173764&view=diff
==============================================================================
---
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
(original)
+++
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java
Wed Sep 21 17:08:00 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/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
URL:
http://svn.apache.org/viewvc/hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java?rev=1173764&r1=1173763&r2=1173764&view=diff
==============================================================================
---
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
(original)
+++
hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/replication/TestReplication.java
Wed Sep 21 17:08:00 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);