hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r722824 [2/2] - in /hadoop/hbase/branches/0.19_on_hadoop_0.18: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/io/ src/java/org/apache/hadoop/hbase/ipc/ src/java/org/apache/hado...
Date Wed, 03 Dec 2008 09:43:58 GMT
Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java?rev=722824&r1=722823&r2=722824&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java
(original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/test/org/apache/hadoop/hbase/thrift/TestThriftServer.java
Wed Dec  3 01:43:57 2008
@@ -166,7 +166,7 @@
       failed2 = true;
     }
     assertTrue(failed2);
-    assertEquals(handler.getRow(tableAname, rowBname).columns.size(), 0);
+    assertNull(handler.getRow(tableAname, rowBname));
 
     // Teardown
     handler.disableTable(tableAname);
@@ -189,6 +189,10 @@
     long time1 = System.currentTimeMillis();
     handler.mutateRowTs(tableAname, rowAname, getMutations(), time1);
 
+    // Sleep to assure that 'time1' and 'time2' will be different even with a
+    // coarse grained system timer.
+    Thread.sleep(1000);
+
     // Apply timestamped BatchMutations for rowA and rowB
     long time2 = System.currentTimeMillis();
     handler.mutateRowsTs(tableAname, getBatchMutations(), time2);
@@ -231,7 +235,7 @@
     }
     assertTrue(failed);
     assertTrue(Bytes.equals(handler.get(tableAname, rowAname, columnBname).value, valueCname));
-    assertEquals(handler.getRow(tableAname, rowBname).columns.size(), 0);
+    assertNull(handler.getRow(tableAname, rowBname));
 
     // Teardown
     handler.disableTable(tableAname);
@@ -253,6 +257,10 @@
     long time1 = System.currentTimeMillis();
     handler.mutateRowTs(tableAname, rowAname, getMutations(), time1);
 
+    // Sleep to assure that 'time1' and 'time2' will be different even with a
+    // coarse grained system timer.
+    Thread.sleep(1000);
+
     // Apply timestamped BatchMutations for rowA and rowB
     long time2 = System.currentTimeMillis();
     handler.mutateRowsTs(tableAname, getBatchMutations(), time2);

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/WEB-INF/web.xml?rev=722824&r1=722823&r2=722824&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/WEB-INF/web.xml (original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/WEB-INF/web.xml Wed Dec 
3 01:43:57 2008
@@ -15,13 +15,13 @@
     </servlet>
 
     <servlet>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
-        <servlet-class>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-class>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
+        <servlet-class>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-class>
     </servlet>
 
     <servlet>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
-        <servlet-class>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-class>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
+        <servlet-class>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-class>
     </servlet>
 
     <servlet-mapping>
@@ -30,13 +30,13 @@
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
-        <url-pattern>/regionhistorian.jsp</url-pattern>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
+        <url-pattern>/table.jsp</url-pattern>
     </servlet-mapping>
 
     <servlet-mapping>
-        <servlet-name>org.apache.hadoop.hbase.generated.master.table_jsp</servlet-name>
-        <url-pattern>/table.jsp</url-pattern>
+        <servlet-name>org.apache.hadoop.hbase.generated.master.regionhistorian_jsp</servlet-name>
+        <url-pattern>/regionhistorian.jsp</url-pattern>
     </servlet-mapping>
 
 </web-app>

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/master.jsp?rev=722824&r1=722823&r2=722824&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/master/master.jsp Wed Dec  3 01:43:57
2008
@@ -96,7 +96,7 @@
 %>
 <tr><td><a href="<%= url %>"><%= hostname %></a></td><td><%=
startCode %></td><td><%= hsi.getLoad().toString(interval) %></td></tr>
 <%   } %>
-<tr><th>Total: </th><td>servers: <%= serverToServerInfos.size()
%></td><td>&nbsp;</td><td>requests: <%= totalRequests %>
regions: <%= totalRegions %></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 second and count of regions loaded</p>

Modified: hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/regionserver/regionserver.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/regionserver/regionserver.jsp?rev=722824&r1=722823&r2=722824&view=diff
==============================================================================
--- hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/regionserver/regionserver.jsp (original)
+++ hadoop/hbase/branches/0.19_on_hadoop_0.18/src/webapps/regionserver/regionserver.jsp Wed
Dec  3 01:43:57 2008
@@ -7,12 +7,14 @@
   import="org.apache.hadoop.hbase.util.Bytes"
   import="org.apache.hadoop.hbase.HConstants"
   import="org.apache.hadoop.hbase.HServerInfo"
+  import="org.apache.hadoop.hbase.HServerLoad"
   import="org.apache.hadoop.hbase.HRegionInfo" %><%
   HRegionServer regionServer = (HRegionServer)getServletContext().getAttribute(HRegionServer.REGIONSERVER);
   HServerInfo serverInfo = regionServer.getServerInfo();
   RegionServerMetrics metrics = regionServer.getMetrics();
   Collection<HRegionInfo> onlineRegions = regionServer.getSortedOnlineRegionInfos();
   int interval = regionServer.getConfiguration().getInt("hbase.regionserver.msginterval",
3000)/1000;
+
 %><?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
@@ -34,16 +36,20 @@
 <tr><th>Attribute Name</th><th>Value</th><th>Description</th></tr>
 <tr><td>HBase Version</td><td><%= org.apache.hadoop.hbase.util.VersionInfo.getVersion()
%>, r<%= org.apache.hadoop.hbase.util.VersionInfo.getRevision() %></td><td>HBase
version and svn revision</td></tr>
 <tr><td>HBase Compiled</td><td><%= org.apache.hadoop.hbase.util.VersionInfo.getDate()
%>, <%= org.apache.hadoop.hbase.util.VersionInfo.getUser() %></td><td>When
HBase version was compiled and by whom</td></tr>
-<tr><td>Metrics</td><td><%= metrics.toString() %></td><td>RegionServer
Metrics</td></tr>
+<tr><td>Metrics</td><td><%= metrics.toString() %></td><td>RegionServer
Metrics; file and heap sizes are in megabytes</td></tr>
 </table>
 
 <h2>Online Regions</h2>
 <% if (onlineRegions != null && onlineRegions.size() > 0) { %>
 <table>
-<tr><th>Region Name</th><th>Encoded Name</th><th>Start
Key</th><th>End Key</th></tr>
-<%   for (HRegionInfo r: onlineRegions) { %>
+<tr><th>Region Name</th><th>Encoded Name</th><th>Start
Key</th><th>End Key</th><th>Metrics</th></tr>
+<%   for (HRegionInfo r: onlineRegions) { 
+        HServerLoad.RegionLoad load = regionServer.createRegionLoad(r.getRegionName());
+ %>
 <tr><td><%= r.getRegionNameAsString() %></td><td><%= r.getEncodedName()
%></td>
-    <td><%= Bytes.toString(r.getStartKey()) %></td><td><%= Bytes.toString(r.getEndKey())
%></td></tr>
+    <td><%= Bytes.toString(r.getStartKey()) %></td><td><%= Bytes.toString(r.getEndKey())
%></td>
+    <td><%= load.toString() %></td>
+    </tr>
 <%   } %>
 </table>
 <p>Region names are made of the containing table's name, a comma,



Mime
View raw message