hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1098919 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/ServerManager.java src/main/resources/hbase-webapps/master/master.jsp
Date Tue, 03 May 2011 05:48:37 GMT
Author: stack
Date: Tue May  3 05:48:37 2011
New Revision: 1098919

URL: http://svn.apache.org/viewvc?rev=1098919&view=rev
Log:
HBASE-3849 Fix master ui; hbase-1502 broke requests/second

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
    hbase/trunk/src/main/resources/hbase-webapps/master/master.jsp

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1098919&r1=1098918&r2=1098919&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue May  3 05:48:37 2011
@@ -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)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=1098919&r1=1098918&r2=1098919&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java Tue May  3
05:48:37 2011
@@ -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);
   }
 
   /**

Modified: hbase/trunk/src/main/resources/hbase-webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/resources/hbase-webapps/master/master.jsp?rev=1098919&r1=1098918&r2=1098919&view=diff
==============================================================================
--- hbase/trunk/src/main/resources/hbase-webapps/master/master.jsp (original)
+++ hbase/trunk/src/main/resources/hbase-webapps/master/master.jsp Tue May  3 05:48:37 2011
@@ -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>



Mime
View raw message