You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/07/27 15:21:18 UTC

[hbase] branch branch-2.3 updated: HBASE-24777 InfoServer support ipv6 host and port

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

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


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 93d9246  HBASE-24777 InfoServer support ipv6 host and port
93d9246 is described below

commit 93d924615fcbabf43973c216d1cd061092439326
Author: YeChao Chen <ch...@gmail.com>
AuthorDate: Mon Jul 27 20:41:49 2020 +0530

    HBASE-24777 InfoServer support ipv6 host and port
    
    Closes #2147
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../src/main/java/org/apache/hadoop/hbase/http/InfoServer.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
index 6a1ffbc..3dd3877 100644
--- a/hbase-http/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
+++ b/hbase-http/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
@@ -30,6 +30,8 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.security.authorize.AccessControlList;
 import org.apache.yetus.audience.InterfaceAudience;
 
+import org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
+
 /**
  * Create a Jetty embedded server to answer http requests. The primary goal
  * is to serve up status information for the server.
@@ -61,8 +63,8 @@ public class InfoServer {
       new org.apache.hadoop.hbase.http.HttpServer.Builder();
 
     builder.setName(name).addEndpoint(URI.create(httpConfig.getSchemePrefix() +
-      bindAddress + ":" +
-      port)).setAppDir(HBASE_APP_DIR).setFindPort(findPort).setConf(c);
+      HostAndPort.fromParts(bindAddress,port).toString())).
+        setAppDir(HBASE_APP_DIR).setFindPort(findPort).setConf(c);
     String logDir = System.getProperty("hbase.log.dir");
     if (logDir != null) {
       builder.setLogDir(logDir);