You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zg...@apache.org on 2019/09/11 02:04:34 UTC
[hbase] branch branch-2 updated: HBASE-23005 Table UI showed
exception message when table is disabled (#602)
This is an automated email from the ASF dual-hosted git repository.
zghao pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new 4224977 HBASE-23005 Table UI showed exception message when table is disabled (#602)
4224977 is described below
commit 4224977c0f4d4e5120b3abdd9853a6c5b9c6554a
Author: Guanghao Zhang <zg...@apache.org>
AuthorDate: Wed Sep 11 09:52:37 2019 +0800
HBASE-23005 Table UI showed exception message when table is disabled (#602)
Signed-off-by: Sean Busbey <bu...@apache.org>
---
.../main/resources/hbase-webapps/master/table.jsp | 24 ++++++++++++----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 55c0e15..7553d67 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -263,24 +263,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>