HBASE-3231 Update to zookeeper 3.3.2.

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1037053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-11-19 22:21:09 +00:00
parent a5f27d67ca
commit 3f8eb6e0ed
3 changed files with 9 additions and 3 deletions

View File

@ -1166,6 +1166,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

View File

@ -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();

View File

@ -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());