HBASE-9954 Incorporate HTTPS support for HBase

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1542392 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-11-15 20:44:55 +00:00
parent 4b87240aa3
commit 2859897de6
3 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
<%if (!master.isActiveMaster()) %> <%if (!master.isActiveMaster()) %>
<%if serverNames[0] != null %> <%if serverNames[0] != null %>
<h2>Master</h2> <h2>Master</h2>
<a href="http://<% serverNames[0].getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverNames[0].getHostname() %></a> <a href="//<% serverNames[0].getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverNames[0].getHostname() %></a>
<%else> <%else>
Unable to parse master hostname. Unable to parse master hostname.
</%if> </%if>
@ -62,7 +62,7 @@ ServerName [] serverNames = masters.toArray(new ServerName[masters.size()]);
for (ServerName serverName : serverNames) { for (ServerName serverName : serverNames) {
</%java> </%java>
<tr> <tr>
<td><a href="http://<% serverName.getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverName.getHostname() %></a></td> <td><a href="//<% serverName.getHostname() %>:<% master.getConfiguration().getInt("hbase.master.info.port", 60010) %>/master-status" target="_blank"><% serverName.getHostname() %></a></td>
<td><% serverName.getPort() %></td> <td><% serverName.getPort() %></td>
<td><% new Date(serverName.getStartcode()) %></td> <td><% new Date(serverName.getStartcode()) %></td>
</tr> </tr>

View File

@ -149,7 +149,7 @@ org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
<%else> <%else>
<%java> <%java>
String host = regionServer.getMasterAddressManager().getMasterAddress().getHostname() + ":" + masterInfoPort; String host = regionServer.getMasterAddressManager().getMasterAddress().getHostname() + ":" + masterInfoPort;
String url = "http://" + host + "/"; String url = "//" + host + "/";
</%java> </%java>
<a href="<% url %>"><% host %></a> <a href="<% url %>"><% host %></a>
</%if> </%if>

View File

@ -200,7 +200,7 @@
HRegionInfo meta = HRegionInfo.FIRST_META_REGIONINFO; HRegionInfo meta = HRegionInfo.FIRST_META_REGIONINFO;
ServerName metaLocation = master.getCatalogTracker().waitForMeta(1); ServerName metaLocation = master.getCatalogTracker().waitForMeta(1);
for (int i = 0; i < 1; i++) { for (int i = 0; i < 1; i++) {
String url = "http://" + metaLocation.getHostname() + ":" + infoPort + "/"; String url = "//" + metaLocation.getHostname() + ":" + infoPort + "/";
%> %>
<tr> <tr>
<td><%= escapeXml(meta.getRegionNameAsString()) %></td> <td><%= escapeXml(meta.getRegionNameAsString()) %></td>
@ -273,7 +273,7 @@
} }
// This port might be wrong if RS actually ended up using something else. // This port might be wrong if RS actually ended up using something else.
urlRegionServer = urlRegionServer =
"http://" + addr.getHostname().toString() + ":" + infoPort + "/"; addr.getHostname().toString() + ":" + infoPort;
Integer i = regDistribution.get(urlRegionServer); Integer i = regDistribution.get(urlRegionServer);
if (null == i) i = Integer.valueOf(0); if (null == i) i = Integer.valueOf(0);
regDistribution.put(urlRegionServer, i+1); regDistribution.put(urlRegionServer, i+1);
@ -286,7 +286,7 @@
if (urlRegionServer != null) { if (urlRegionServer != null) {
%> %>
<td> <td>
<a href="<%= urlRegionServer %>"><%= addr.getHostname().toString() + ":" + infoPort %></a> <a href="<%= "//" + urlRegionServer + "/" %>"><%= urlRegionServer %></a>
</td> </td>
<% <%
} else { } else {
@ -307,7 +307,7 @@
for (Map.Entry<String, Integer> rdEntry : regDistribution.entrySet()) { for (Map.Entry<String, Integer> rdEntry : regDistribution.entrySet()) {
%> %>
<tr> <tr>
<td><a href="<%= rdEntry.getKey()%>"><%= rdEntry.getKey()%></a></td> <td><a href="<%= "//" + rdEntry.getKey() + "/" %>"><%= rdEntry.getKey()%></a></td>
<td><%= rdEntry.getValue()%></td> <td><%= rdEntry.getValue()%></td>
</tr> </tr>
<% } %> <% } %>