HBASE-3353. table.jsp doesn't handle entries in META without server info
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1048926 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5a36e4032a
commit
ebae4daf4e
|
@ -767,6 +767,7 @@ Release 0.90.0 - Unreleased
|
|||
info:regioninfo column
|
||||
HBASE-3321 Replication.join shouldn't clear the logs znode
|
||||
HBASE-3352 enabling a non-existent table from shell prints no error
|
||||
HBASE-3353 table.jsp doesn't handle entries in META without server info
|
||||
|
||||
|
||||
IMPROVEMENTS
|
||||
|
|
|
@ -138,21 +138,44 @@
|
|||
<%= tableHeader %>
|
||||
<%
|
||||
for(Map.Entry<HRegionInfo, HServerAddress> hriEntry : regions.entrySet()) {
|
||||
int infoPort = master.getServerManager().getHServerInfo(hriEntry.getValue()).getInfoPort();
|
||||
String urlRegionServer =
|
||||
"http://" + hriEntry.getValue().getHostname().toString() + ":" + infoPort + "/";
|
||||
HRegionInfo regionInfo = hriEntry.getKey();
|
||||
HServerAddress addr = hriEntry.getValue();
|
||||
|
||||
int infoPort = 0;
|
||||
String urlRegionServer = null;
|
||||
|
||||
if (addr != null) {
|
||||
HServerInfo info = master.getServerManager().getHServerInfo(addr);
|
||||
if (info != null) {
|
||||
infoPort = info.getInfoPort();
|
||||
urlRegionServer =
|
||||
"http://" + addr.getHostname().toString() + ":" + infoPort + "/";
|
||||
}
|
||||
}
|
||||
%>
|
||||
<tr>
|
||||
<td><%= Bytes.toStringBinary(hriEntry.getKey().getRegionName())%></td>
|
||||
<td><a href="<%= urlRegionServer %>"><%= hriEntry.getValue().getHostname().toString() + ":" + infoPort %></a></td>
|
||||
<td><%= Bytes.toStringBinary(hriEntry.getKey().getStartKey())%></td>
|
||||
<td><%= Bytes.toStringBinary(hriEntry.getKey().getEndKey())%></td>
|
||||
<td><%= Bytes.toStringBinary(regionInfo.getRegionName())%></td>
|
||||
<%
|
||||
if (urlRegionServer != null) {
|
||||
%>
|
||||
<td>
|
||||
<a href="<%= urlRegionServer %>"><%= addr.getHostname().toString() + ":" + infoPort %></a>
|
||||
</td>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<td class="undeployed-region">not deployed</td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td><%= Bytes.toStringBinary(regionInfo.getStartKey())%></td>
|
||||
<td><%= Bytes.toStringBinary(regionInfo.getEndKey())%></td>
|
||||
</tr>
|
||||
<% } %>
|
||||
</table>
|
||||
<% }
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
ex.printStackTrace(System.err);
|
||||
}
|
||||
} // end else
|
||||
%>
|
||||
|
|
|
@ -13,3 +13,7 @@ div.warning {
|
|||
font-size: 110%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td.undeployed-region {
|
||||
background-color: #faa;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue