You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2022/10/11 19:36:30 UTC

[hbase] branch branch-2.4 updated: HBASE-27420 Allow non-loopback for zk standalone server in minizkcluster (#4819)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 00f72f346f2 HBASE-27420 Allow non-loopback for zk standalone server in minizkcluster (#4819)
00f72f346f2 is described below

commit 00f72f346f2f737c2df210fd882a653eb660a108
Author: sanjeet006py <36...@users.noreply.github.com>
AuthorDate: Tue Oct 11 23:05:57 2022 +0530

    HBASE-27420 Allow non-loopback for zk standalone server in minizkcluster (#4819)
    
    Signed-off-by: Andrew Purtell <ap...@apache.org>
    Signed-off-by: Viraj Jasani <vj...@apache.org>
    Co-authored-by: Sanjeet Malhotra <sa...@salesforce.com>
---
 .../java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
index 10a8624f808..ab608f8efa6 100644
--- a/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
+++ b/hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java
@@ -234,7 +234,9 @@ public class MiniZooKeeperCluster {
       while (true) {
         try {
           standaloneServerFactory = new NIOServerCnxnFactory();
-          standaloneServerFactory.configure(new InetSocketAddress(LOOPBACK_HOST, currentClientPort),
+          String bindAddr =
+            configuration.get("hbase.zookeeper.property.clientPortAddress", LOOPBACK_HOST);
+          standaloneServerFactory.configure(new InetSocketAddress(bindAddr, currentClientPort),
             configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS,
               HConstants.DEFAULT_ZOOKEEPER_MAX_CLIENT_CNXNS));
         } catch (BindException e) {