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 <liuml07@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
f73b9085ad
commit
a857c6d90c
|
@ -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,12 +656,17 @@
|
|||
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 <%
|
||||
}
|
||||
}
|
||||
} else {
|
||||
%><%= CompactionState.NONE %><%
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue