HADOOP-2257 Show a total of all requests and regions on the web ui
git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@598699 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9abf5c728
commit
3bff065d34
|
@ -53,6 +53,7 @@ Trunk (unreleased changes)
|
|||
command.
|
||||
HADOOP-2262 HADOOP-2261 fail fast on non-existing table, change abort to
|
||||
function after commit even if commit was successful
|
||||
HADOOP-2257 Show a total of all requests and regions on the web ui
|
||||
|
||||
Release 0.15.1
|
||||
Branch 0.15
|
||||
|
|
|
@ -103,13 +103,21 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.print(msg );
|
||||
out.write("</p>\n\n<h2>Region Servers</h2>\n");
|
||||
if (serverToServerInfos != null && serverToServerInfos.size() > 0) {
|
||||
out.write("\n<table>\n<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>\n\n");
|
||||
out.write('\n');
|
||||
int totalRegions = 0;
|
||||
int totalRequests = 0;
|
||||
|
||||
out.write("\n\n<table>\n<tr><th rowspan=");
|
||||
out.print( serverToServerInfos.size() + 1);
|
||||
out.write("></th><th>Address</th><th>Start Code</th><th>Load</th></tr>\n\n");
|
||||
for (Map.Entry<String, HServerInfo> e: serverToServerInfos.entrySet()) {
|
||||
HServerInfo hsi = e.getValue();
|
||||
String url = "http://" +
|
||||
hsi.getServerAddress().getBindAddress().toString() + ":" +
|
||||
hsi.getInfoPort() + "/";
|
||||
String load = hsi.getLoad().toString();
|
||||
totalRegions += hsi.getLoad().getNumberOfRegions();
|
||||
totalRequests += hsi.getLoad().getNumberOfRequests();
|
||||
long startCode = hsi.getStartCode();
|
||||
String address = hsi.getServerAddress().toString();
|
||||
|
||||
|
@ -122,9 +130,15 @@ public final class master_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.print( startCode );
|
||||
out.write("</td><td>");
|
||||
out.print( load );
|
||||
out.write("</tr>\n");
|
||||
out.write("</td></tr>\n");
|
||||
}
|
||||
out.write("\n</table>\n<p>Load is requests per <em>hbase.regionsserver.msginterval</em> (");
|
||||
out.write("\n<tr><th>Total: </th><td>servers: ");
|
||||
out.print( serverToServerInfos.size() );
|
||||
out.write("</td><td> </td><td>requests: ");
|
||||
out.print( totalRequests );
|
||||
out.write(" regions: ");
|
||||
out.print( totalRegions );
|
||||
out.write("</td></tr>\n</table>\n\n<p>Load is requests per <em>hbase.regionsserver.msginterval</em> (");
|
||||
out.print(interval);
|
||||
out.write(" second(s)) and count of regions loaded</p>\n");
|
||||
}
|
||||
|
|
|
@ -68,8 +68,12 @@
|
|||
|
||||
<h2>Region Servers</h2>
|
||||
<% if (serverToServerInfos != null && serverToServerInfos.size() > 0) { %>
|
||||
<% int totalRegions = 0;
|
||||
int totalRequests = 0;
|
||||
%>
|
||||
|
||||
<table>
|
||||
<tr><th>Address</th><th>Start Code</th><th>Load</th></tr>
|
||||
<tr><th rowspan=<%= serverToServerInfos.size() + 1%>></th><th>Address</th><th>Start Code</th><th>Load</th></tr>
|
||||
|
||||
<% for (Map.Entry<String, HServerInfo> e: serverToServerInfos.entrySet()) {
|
||||
HServerInfo hsi = e.getValue();
|
||||
|
@ -77,12 +81,16 @@
|
|||
hsi.getServerAddress().getBindAddress().toString() + ":" +
|
||||
hsi.getInfoPort() + "/";
|
||||
String load = hsi.getLoad().toString();
|
||||
totalRegions += hsi.getLoad().getNumberOfRegions();
|
||||
totalRequests += hsi.getLoad().getNumberOfRequests();
|
||||
long startCode = hsi.getStartCode();
|
||||
String address = hsi.getServerAddress().toString();
|
||||
%>
|
||||
<tr><td><a href="<%= url %>"><%= address %></a></td><td><%= startCode %></td><td><%= load %></tr>
|
||||
<tr><td><a href="<%= url %>"><%= address %></a></td><td><%= startCode %></td><td><%= load %></td></tr>
|
||||
<% } %>
|
||||
<tr><th>Total: </th><td>servers: <%= serverToServerInfos.size() %></td><td> </td><td>requests: <%= totalRequests %> regions: <%= totalRegions %></td></tr>
|
||||
</table>
|
||||
|
||||
<p>Load is requests per <em>hbase.regionsserver.msginterval</em> (<%=interval%> second(s)) and count of regions loaded</p>
|
||||
<% } %>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue