HBASE-24777 InfoServer support ipv6 host and port
Closes #2147 Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
527e4a67d8
commit
b154f20c4d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue