hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r598699 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java src/webapps/master/master.jsp
Date Tue, 27 Nov 2007 17:12:53 GMT
Author: stack
Date: Tue Nov 27 09:12:52 2007
New Revision: 598699

URL: http://svn.apache.org/viewvc?rev=598699&view=rev
Log:
HADOOP-2257 Show a total of all requests and regions on the web ui

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java
    lucene/hadoop/trunk/src/contrib/hbase/src/webapps/master/master.jsp

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=598699&r1=598698&r2=598699&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Tue Nov 27 09:12:52 2007
@@ -53,6 +53,7 @@
                 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

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java?rev=598699&r1=598698&r2=598699&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/generated/master/master_jsp.java
Tue Nov 27 09:12:52 2007
@@ -103,13 +103,21 @@
       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 @@
       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>&nbsp;</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");
  } 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/webapps/master/master.jsp?rev=598699&r1=598698&r2=598699&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/webapps/master/master.jsp (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/webapps/master/master.jsp Tue Nov 27 09:12:52
2007
@@ -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>&nbsp;</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>



Mime
View raw message