You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/07/20 16:11:06 UTC
[hbase] branch master updated: HBASE-24714 Error message is
displayed in UI of table's compaction state if any region of that table is
not open
This is an automated email from the ASF dual-hosted git repository.
vjasani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new a857c6d HBASE-24714 Error message is displayed in UI of table's compaction state if any region of that table is not open
a857c6d is described below
commit a857c6d90c7574e4957bec7ca92799e3bba70f2d
Author: Sanjeet Nishad <sa...@gmail.com>
AuthorDate: Mon Jul 20 21:36:15 2020 +0530
HBASE-24714 Error message is displayed in UI of table's compaction state if any region of that table is not open
Closes #2047
Signed-off-by: Mingliang Liu <li...@apache.org>
Signed-off-by: Viraj Jasani <vj...@apache.org>
---
.../src/main/resources/hbase-webapps/master/table.jsp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 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 23a66c8..fef2ed5 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -35,6 +35,7 @@
import="org.apache.hadoop.hbase.HConstants"
import="org.apache.hadoop.hbase.HRegionLocation"
import="org.apache.hadoop.hbase.HTableDescriptor"
+ import="org.apache.hadoop.hbase.NotServingRegionException"
import="org.apache.hadoop.hbase.RegionMetrics"
import="org.apache.hadoop.hbase.RegionMetricsBuilder"
import="org.apache.hadoop.hbase.ServerMetrics"
@@ -655,11 +656,16 @@
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(e.getCause() != null && e.getCause().getCause() instanceof NotServingRegionException) {
+ %><%= CompactionState.NONE %><%
+ } else {
+ // Nothing really to do here
+ for(StackTraceElement element : e.getStackTrace()) {
+ %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
+ }
+ %> Unknown <%
}
- %> Unknown <%
}
} else {
%><%= CompactionState.NONE %><%