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

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


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

commit b154f20c4dba95aebdfc845282f1c8543f82799e
Author: YeChao Chen <chenyec...@gmail.com>
AuthorDate: Mon Jul 27 21:25:57 2020 +0530

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

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
index 0f6c3dd..9dbd766 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java
@@ -19,6 +19,8 @@
 
 package org.apache.hadoop.hbase.http;
 
+import com.google.common.net.HostAndPort;
+
 import java.io.IOException;
 import java.net.URI;
 
@@ -28,6 +30,7 @@ import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 
+
 /**
  * Create a Jetty embedded server to answer http requests. The primary goal
  * is to serve up status information for the server.
@@ -60,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);

Reply via email to