Skip to content

Commit b656456

Browse files
sanjeet006pySanjeet Malhotra
andauthored
HBASE-27420 Allow non-loopback for zk standalone server in minizkcluster (#4819)
Signed-off-by: Andrew Purtell <[email protected]> Signed-off-by: Viraj Jasani <[email protected]> Co-authored-by: Sanjeet Malhotra <[email protected]>
1 parent 2cc6478 commit b656456

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ public int startup(File baseDir, int numZooKeeperServers)
237237
while (true) {
238238
try {
239239
standaloneServerFactory = new NIOServerCnxnFactory();
240-
standaloneServerFactory.configure(new InetSocketAddress(LOOPBACK_HOST, currentClientPort),
240+
String bindAddr =
241+
configuration.get("hbase.zookeeper.property.clientPortAddress", LOOPBACK_HOST);
242+
standaloneServerFactory.configure(new InetSocketAddress(bindAddr, currentClientPort),
241243
configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS,
242244
HConstants.DEFAULT_ZOOKEEPER_MAX_CLIENT_CNXNS));
243245
} catch (BindException e) {

0 commit comments

Comments
 (0)