HBASE-23005 Table UI showed exception message when table is disabled (#602)

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Guanghao Zhang 2019-09-11 09:52:37 +08:00
parent e9e6202f9c
commit 3cfcee9eda
1 changed files with 13 additions and 11 deletions

View File

@ -275,24 +275,26 @@ if (fqtn != null && master.isInitialized()) {
</tr>
<tr>
<td>Enabled</td>
<td><%= admin.isTableEnabled(table.getName()).get() %></td>
<td><%= master.getAssignmentManager().isTableEnabled(table.getName()) %></td>
<td>Is the table enabled</td>
</tr>
<tr>
<td>Compaction</td>
<td>
<%
try {
CompactionState compactionState = admin.getCompactionState(table.getName()).get();
%>
<%= compactionState %>
<%
} catch (Exception e) {
// Nothing really to do here
for(StackTraceElement element : e.getStackTrace()) {
%><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
if (master.getAssignmentManager().isTableEnabled(table.getName())) {
try {
CompactionState compactionState = admin.getCompactionState(table.getName()).get();
%><%= compactionState %><%
} catch (Exception e) {
// Nothing really to do here
for(StackTraceElement element : e.getStackTrace()) {
%><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
}
%> Unknown <%
}
%> Unknown <%
} else {
%><%= CompactionState.NONE %><%
}
%>
</td>