HBASE-3849 Fix master ui; hbase-1502 broke requests/second

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1098919 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-05-03 05:48:37 +00:00
parent 9c1d01e24f
commit b6ad337ea1
3 changed files with 10 additions and 5 deletions

View File

@ -97,6 +97,7 @@ Release 0.91.0 - Unreleased
no RegionObserver registered (Himanshu Vashishtha)
HBASE-3847 Turn off DEBUG logging of RPCs in WriteableRPCEngine on TRUNK
HBASE-3777 Redefine Identity Of HBase Configuration (Karthick Sankarachary)
HBASE-3849 Fix master ui; hbase-1502 broke requests/second
IMPROVEMENTS
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)

View File

@ -238,7 +238,7 @@ public class ServerManager {
* @return HServerLoad if serverName is known else null
*/
public HServerLoad getLoad(final ServerName serverName) {
return this.onlineServers.get(serverName.toString());
return this.onlineServers.get(serverName);
}
/**

View File

@ -8,6 +8,7 @@
import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.ServerName"
import="org.apache.hadoop.hbase.HServerLoad"
import="org.apache.hadoop.hbase.client.HBaseAdmin"
import="org.apache.hadoop.hbase.client.HConnectionManager"
import="org.apache.hadoop.hbase.HTableDescriptor" %><%
@ -148,12 +149,15 @@
// HARDCODED FOR NOW; FIX -- READ FROM ZK
String hostname = serverName.getHostname() + ":60020";
String url = "http://" + hostname + "/";
// TODO: FIX
totalRegions += 0;
totalRequests += 0;
HServerLoad hsl = master.getServerManager().getLoad(serverName);
String loadStr = hsl == null? "-": hsl.toString();
if (hsl != null) {
totalRegions += hsl.getNumberOfRegions();
totalRequests += hsl.getNumberOfRequests();
}
long startCode = serverName.getStartcode();
%>
<tr><td><a href="<%= url %>"><%= hostname %></a></td><td><%= startCode %></td><td><%= 0 %></td></tr>
<tr><td><a href="<%= url %>"><%= hostname %></a></td><td><%= startCode %><%= serverName %></td><td><%= loadStr %></td></tr>
<% } %>
<tr><th>Total: </th><td>servers: <%= servers.size() %></td><td>&nbsp;</td><td>requests=<%= totalRequests %>, regions=<%= totalRegions %></td></tr>
</table>