You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by to...@apache.org on 2010/12/14 04:56:39 UTC

svn commit: r1048926 - in /hbase/trunk: CHANGES.txt src/main/resources/hbase-webapps/master/table.jsp src/main/resources/hbase-webapps/static/hbase.css

Author: todd
Date: Tue Dec 14 03:56:39 2010
New Revision: 1048926

URL: http://svn.apache.org/viewvc?rev=1048926&view=rev
Log:
HBASE-3353. table.jsp doesn't handle entries in META without server info

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/resources/hbase-webapps/master/table.jsp
    hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1048926&r1=1048925&r2=1048926&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Dec 14 03:56:39 2010
@@ -767,6 +767,7 @@ Release 0.90.0 - Unreleased
                info:regioninfo column
    HBASE-3321  Replication.join shouldn't clear the logs znode
    HBASE-3352  enabling a non-existent table from shell prints no error
+   HBASE-3353  table.jsp doesn't handle entries in META without server info
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/main/resources/hbase-webapps/master/table.jsp
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/resources/hbase-webapps/master/table.jsp?rev=1048926&r1=1048925&r2=1048926&view=diff
==============================================================================
--- hbase/trunk/src/main/resources/hbase-webapps/master/table.jsp (original)
+++ hbase/trunk/src/main/resources/hbase-webapps/master/table.jsp Tue Dec 14 03:56:39 2010
@@ -138,21 +138,44 @@
 <%=     tableHeader %>
 <%
   for(Map.Entry<HRegionInfo, HServerAddress> hriEntry : regions.entrySet()) {
-    int infoPort = master.getServerManager().getHServerInfo(hriEntry.getValue()).getInfoPort();
-    String urlRegionServer =
-        "http://" + hriEntry.getValue().getHostname().toString() + ":" + infoPort + "/";
+    HRegionInfo regionInfo = hriEntry.getKey();
+    HServerAddress addr = hriEntry.getValue();
+
+    int infoPort = 0;
+    String urlRegionServer = null;
+
+    if (addr != null) {
+      HServerInfo info = master.getServerManager().getHServerInfo(addr);
+      if (info != null) {
+        infoPort = info.getInfoPort();
+        urlRegionServer =
+            "http://" + addr.getHostname().toString() + ":" + infoPort + "/";
+      }
+    }
 %>
 <tr>
-  <td><%= Bytes.toStringBinary(hriEntry.getKey().getRegionName())%></td>
-  <td><a href="<%= urlRegionServer %>"><%= hriEntry.getValue().getHostname().toString() + ":" + infoPort %></a></td>
-  <td><%= Bytes.toStringBinary(hriEntry.getKey().getStartKey())%></td>
-  <td><%= Bytes.toStringBinary(hriEntry.getKey().getEndKey())%></td>
+  <td><%= Bytes.toStringBinary(regionInfo.getRegionName())%></td>
+  <%
+  if (urlRegionServer != null) {
+  %>
+  <td>
+    <a href="<%= urlRegionServer %>"><%= addr.getHostname().toString() + ":" + infoPort %></a>
+  </td>
+  <%
+  } else {
+  %>
+  <td class="undeployed-region">not deployed</td>
+  <%
+  }
+  %>
+  <td><%= Bytes.toStringBinary(regionInfo.getStartKey())%></td>
+  <td><%= Bytes.toStringBinary(regionInfo.getEndKey())%></td>
 </tr>
 <% } %>
 </table>
 <% }
 } catch(Exception ex) {
-  ex.printStackTrace();
+  ex.printStackTrace(System.err);
 }
 } // end else
 %>

Modified: hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css?rev=1048926&r1=1048925&r2=1048926&view=diff
==============================================================================
--- hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css (original)
+++ hbase/trunk/src/main/resources/hbase-webapps/static/hbase.css Tue Dec 14 03:56:39 2010
@@ -13,3 +13,7 @@ div.warning {
   font-size: 110%;
   font-weight: bold;
 }
+
+td.undeployed-region {
+  background-color: #faa;
+}