Skip to content

Commit 8f31b12

Browse files
utf7virajjasani
authored andcommitted
HBASE-24777 InfoServer support ipv6 host and port
Closes #2147 Signed-off-by: Duo Zhang <[email protected]> Signed-off-by: Viraj Jasani <[email protected]>
1 parent fce52fe commit 8f31b12

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

hbase-http/src/main/java/org/apache/hadoop/hbase/http/InfoServer.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
import org.apache.hadoop.security.authorize.AccessControlList;
3131
import org.apache.yetus.audience.InterfaceAudience;
3232

33+
import org.apache.hbase.thirdparty.com.google.common.net.HostAndPort;
34+
3335
/**
3436
* Create a Jetty embedded server to answer http requests. The primary goal
3537
* is to serve up status information for the server.
@@ -61,8 +63,8 @@ public InfoServer(String name, String bindAddress, int port, boolean findPort,
6163
new org.apache.hadoop.hbase.http.HttpServer.Builder();
6264

6365
builder.setName(name).addEndpoint(URI.create(httpConfig.getSchemePrefix() +
64-
bindAddress + ":" +
65-
port)).setAppDir(HBASE_APP_DIR).setFindPort(findPort).setConf(c);
66+
HostAndPort.fromParts(bindAddress,port).toString())).
67+
setAppDir(HBASE_APP_DIR).setFindPort(findPort).setConf(c);
6668
String logDir = System.getProperty("hbase.log.dir");
6769
if (logDir != null) {
6870
builder.setLogDir(logDir);

0 commit comments

Comments
 (0)