hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject svn commit: r1037054 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
Date Fri, 19 Nov 2010 22:21:52 GMT
Author: jdcryans
Date: Fri Nov 19 22:21:52 2010
New Revision: 1037054

URL: http://svn.apache.org/viewvc?rev=1037054&view=rev
Log:
HBASE-3231  Update to zookeeper 3.3.2.

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
    hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1037054&r1=1037053&r2=1037054&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Fri Nov 19 22:21:52 2010
@@ -1161,6 +1161,7 @@ Release 0.90.0 - Unreleased
    HBASE-3227  Edit of log messages before branching.
    HBASE-3230  Refresh our hadoop jar and update zookeeper to
                just-released 3.3.2
+   HBASE-3231  Update to zookeeper 3.3.2.
 
 
   NEW FEATURES

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java?rev=1037054&r1=1037053&r2=1037054&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java Fri
Nov 19 22:21:52 2010
@@ -83,7 +83,7 @@ public class HQuorumPeer {
     return address.equals("localhost") || address.equals("127.0.0.1");
   }
 
-  private static void writeMyID(Properties properties) throws IOException {
+  static void writeMyID(Properties properties) throws IOException {
     long myId = -1;
 
     Configuration conf = HBaseConfiguration.create();

Modified: hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java?rev=1037054&r1=1037053&r2=1037054&view=diff
==============================================================================
--- hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
(original)
+++ hbase/branches/0.90/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
Fri Nov 19 22:21:52 2010
@@ -91,7 +91,11 @@ public class TestHQuorumPeer {
     String s =
       "dataDir=" + this.dataDir.toString() + "\n" +
       "clientPort=2181\n" +
-      "server.0=${hbase.master.hostname}:2888:3888\n";
+      "initLimit=2\n" +
+      "syncLimit=2\n" +
+      "server.0=${hbase.master.hostname}:2888:3888\n" +
+      "server.1=server1:2888:3888\n" +
+      "server.2=server2:2888:3888\n";
 
     System.setProperty("hbase.master.hostname", "localhost");
     InputStream is = new ByteArrayInputStream(s.getBytes());
@@ -103,13 +107,14 @@ public class TestHQuorumPeer {
       Integer.valueOf(properties.getProperty("clientPort")));
     assertEquals("localhost:2888:3888", properties.get("server.0"));
 
+    HQuorumPeer.writeMyID(properties);
     QuorumPeerConfig config = new QuorumPeerConfig();
     config.parseProperties(properties);
 
     assertEquals(this.dataDir.toString(), config.getDataDir());
     assertEquals(2181, config.getClientPortAddress().getPort());
     Map<Long,QuorumServer> servers = config.getServers();
-    assertEquals(1, servers.size());
+    assertEquals(3, servers.size());
     assertTrue(servers.containsKey(Long.valueOf(0)));
     QuorumServer server = servers.get(Long.valueOf(0));
     assertEquals("localhost", server.addr.getHostName());



Mime
View raw message