Skip to content

Commit 00f72f3

Browse files
sanjeet006pySanjeet Malhotra
authored andcommitted
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 4ec7ee5 commit 00f72f3

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
@@ -234,7 +234,9 @@ public int startup(File baseDir, int numZooKeeperServers)
234234
while (true) {
235235
try {
236236
standaloneServerFactory = new NIOServerCnxnFactory();
237-
standaloneServerFactory.configure(new InetSocketAddress(LOOPBACK_HOST, currentClientPort),
237+
String bindAddr =
238+
configuration.get("hbase.zookeeper.property.clientPortAddress", LOOPBACK_HOST);
239+
standaloneServerFactory.configure(new InetSocketAddress(bindAddr, currentClientPort),
238240
configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS,
239241
HConstants.DEFAULT_ZOOKEEPER_MAX_CLIENT_CNXNS));
240242
} catch (BindException e) {

0 commit comments

Comments
 (0)