HBASE-4156 ZKConfig defaults clientPort improperly

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1155971 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-08-09 23:31:30 +00:00
parent 0dfdee6365
commit e9677da00e
3 changed files with 4 additions and 6 deletions

View File

@ -196,6 +196,8 @@ Release 0.91.0 - Unreleased
(Michael Weng)
HBASE-4181 HConnectionManager can't find cached HRegionInterface and makes clients
work very slow (Jia Liu)
HBASE-4156 ZKConfig defaults clientPort improperly (Michajlo Matijkiw)
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -47,8 +47,7 @@ public class ZKConfig {
private static final String ZK_CFG_PROPERTY = "hbase.zookeeper.property.";
private static final int ZK_CFG_PROPERTY_SIZE = ZK_CFG_PROPERTY.length();
private static final String ZK_CLIENT_PORT_KEY = ZK_CFG_PROPERTY
+ "clientPort";
private static final String ZK_CLIENT_PORT_KEY = "clientPort";
/**
* Make a Properties object holding ZooKeeper config equivalent to zoo.cfg.

View File

@ -132,14 +132,11 @@ public class TestHQuorumPeer {
assertEquals("foo.bar", server.addr.getHostName());
}
/**
* Test Case for HBASE-2305
*/
@Test public void testShouldAssignDefaultZookeeperClientPort() {
Configuration config = HBaseConfiguration.create();
config.clear();
Properties p = ZKConfig.makeZKProps(config);
assertNotNull(p);
assertEquals(2181, p.get("hbase.zookeeper.property.clientPort"));
assertEquals(2181, p.get("clientPort"));
}
}