This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 6742d60  HBASE-24714 Error message is displayed in UI of table's 
compaction state if any region of that table is not open
6742d60 is described below

commit 6742d6005205a73c3780ba09821f5e2d28f1c5e2
Author: Sanjeet Nishad <sanjeetnisha...@gmail.com>
AuthorDate: Tue Jul 21 12:32:28 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 <lium...@apache.org>
    Signed-off-by: Viraj Jasani <vjas...@apache.org>
---
 .../src/main/resources/hbase-webapps/master/table.jsp        | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 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 8f9673c..f9bbc47 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -34,6 +34,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"
@@ -566,11 +567,16 @@
                 CompactionState compactionState = 
admin.getCompactionState(table.getName()).get();
           %><%= compactionState %><%
         } catch (Exception e) {
+
+          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 <%
+          %><%= StringEscapeUtils.escapeHtml4(element.toString()) %><%
+              }
+          %> Unknown <%
+            }
           }
         } else {
         %><%= CompactionState.NONE %><%

Reply via email to