HBASE-9328 Table web UI is corrupted sometime

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1523098 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-09-13 20:52:53 +00:00
parent 76e797d764
commit 3583d29fc3
2 changed files with 25 additions and 1 deletions

View File

@ -2525,6 +2525,15 @@ public class HBaseAdmin implements Abortable, Closeable {
pair.getFirst() + ": " + pair.getFirst() + ": " +
StringUtils.stringifyException(e)); StringUtils.stringifyException(e));
} }
} catch (RemoteException e) {
if (e.getMessage().indexOf(NotServingRegionException.class.getName()) >= 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("Trying to get compaction state of " + pair.getFirst() + ": "
+ StringUtils.stringifyException(e));
}
} else {
throw e;
}
} }
} }
} }

View File

@ -32,6 +32,8 @@
import="org.apache.hadoop.hbase.master.HMaster" import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.util.Bytes" import="org.apache.hadoop.hbase.util.Bytes"
import="org.apache.hadoop.hbase.util.FSUtils" import="org.apache.hadoop.hbase.util.FSUtils"
import="org.apache.hadoop.hbase.regionserver.compactions.CompactionRequest"
import="org.apache.hadoop.hbase.protobuf.generated.AdminProtos.GetRegionInfoResponse.CompactionState"
import="org.apache.hadoop.hbase.TableName" import="org.apache.hadoop.hbase.TableName"
import="org.apache.hadoop.hbase.HBaseConfiguration" %> import="org.apache.hadoop.hbase.HBaseConfiguration" %>
<% <%
@ -221,7 +223,20 @@
</tr> </tr>
<tr> <tr>
<td>Compaction</td> <td>Compaction</td>
<td><%= hbadmin.getCompactionState(table.getTableName()) %></td> <td>
<%
try {
CompactionState compactionState = hbadmin.getCompactionState(table.getTableName());
%>
<%= compactionState %>
<%
} catch (Exception e) {
// Nothing really to do here
e.printStackTrace();
%> Unknown <%
}
%>
</td>
<td>Is the table compacting</td> <td>Is the table compacting</td>
</tr> </tr>
<% if (showFragmentation) { %> <% if (showFragmentation) { %>