hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1022300 - in /hbase/trunk/src: main/java/org/apache/hadoop/hbase/client/HConnectionManager.java test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
Date Wed, 13 Oct 2010 21:36:51 GMT
Author: stack
Date: Wed Oct 13 21:36:51 2010
New Revision: 1022300

URL: http://svn.apache.org/viewvc?rev=1022300&view=rev
Log:
Needed to change the zk port elsewhere too to make default 21818 rather than 21810; and still
further places

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java?rev=1022300&r1=1022299&r2=1022300&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java Wed Oct
13 21:36:51 2010
@@ -634,6 +634,8 @@ public class HConnectionManager {
         try {
           // locate the root or meta region
           metaLocation = locateRegion(parentTable, metaKey);
+          // If null still, go around again.
+          if (metaLocation == null) continue;
           HRegionInterface server =
             getHRegionConnection(metaLocation.getServerAddress());
 

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java?rev=1022300&r1=1022299&r2=1022300&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java Wed Oct
13 21:36:51 2010
@@ -44,13 +44,14 @@ import static org.junit.Assert.*;
  */
 public class TestHQuorumPeer {
   private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
+  private static int PORT_NO = 21818;
   private Path dataDir;
 
 
   @Before public void setup() throws IOException {
     // Set it to a non-standard port.
     TEST_UTIL.getConfiguration().setInt("hbase.zookeeper.property.clientPort",
-      21818);
+      PORT_NO);
     this.dataDir = HBaseTestingUtility.getTestDir(this.getClass().getName());
     FileSystem fs = FileSystem.get(TEST_UTIL.getConfiguration());
     if (fs.exists(this.dataDir)) {
@@ -68,7 +69,7 @@ public class TestHQuorumPeer {
     conf.set("hbase.zookeeper.property.dataDir", this.dataDir.toString());
     Properties properties = ZKConfig.makeZKProps(conf);
     assertEquals(dataDir.toString(), (String)properties.get("dataDir"));
-    assertEquals(Integer.valueOf(21810),
+    assertEquals(Integer.valueOf(PORT_NO),
       Integer.valueOf(properties.getProperty("clientPort")));
     assertEquals("localhost:2888:3888", properties.get("server.0"));
     assertEquals(null, properties.get("server.1"));
@@ -77,7 +78,8 @@ public class TestHQuorumPeer {
     conf.set(HConstants.ZOOKEEPER_QUORUM, "a.foo.bar,b.foo.bar,c.foo.bar");
     properties = ZKConfig.makeZKProps(conf);
     assertEquals(dataDir.toString(), properties.get("dataDir"));
-    assertEquals(Integer.valueOf(21810), Integer.valueOf(properties.getProperty("clientPort")));
+    assertEquals(Integer.valueOf(PORT_NO),
+      Integer.valueOf(properties.getProperty("clientPort")));
     assertEquals("a.foo.bar:2888:3888", properties.get("server.0"));
     assertEquals("b.foo.bar:2888:3888", properties.get("server.1"));
     assertEquals("c.foo.bar:2888:3888", properties.get("server.2"));



Mime
View raw message