HBASE-22133 Forward port HBASE-22073 "/rits.jsp throws an exception if no procedure" to branch-2.2+
Signed-off-by: Guanghao Zhang <zghao@apache.org>
This commit is contained in:
parent
49cfecb13d
commit
129d806732
|
@ -22,10 +22,11 @@
|
|||
import="java.util.Collections"
|
||||
import="java.util.Comparator"
|
||||
import="java.util.List"
|
||||
import="java.util.stream.Collectors"
|
||||
import="org.apache.hadoop.hbase.master.HMaster"
|
||||
import="org.apache.hadoop.hbase.master.assignment.RegionStateNode"
|
||||
import="org.apache.hadoop.hbase.master.assignment.TransitRegionStateProcedure"
|
||||
%>
|
||||
<%@ page import="java.util.stream.Collectors" %>
|
||||
<%
|
||||
HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
|
||||
List<RegionStateNode> rit = master.getAssignmentManager().getRegionsInTransition();
|
||||
|
@ -86,8 +87,17 @@
|
|||
<td><%= regionStateNode.getRegionInfo().getEncodedName() %></td>
|
||||
<td><%= regionStateNode.getRegionInfo().getTable() %></td>
|
||||
<td><%= regionStateNode.getState() %></td>
|
||||
<td><%= regionStateNode.getProcedure().getProcId() %></td>
|
||||
<td><%= escapeXml(regionStateNode.getProcedure().getState().toString() + (regionStateNode.getProcedure().isBypass() ? "(Bypassed)" : "")) %></td>
|
||||
<%
|
||||
TransitRegionStateProcedure procedure = regionStateNode.getProcedure();
|
||||
|
||||
if (procedure == null) {
|
||||
%>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<% } else { %>
|
||||
<td><%= procedure.getProcId() %></td>
|
||||
<td><%= escapeXml(procedure.getState().toString() + (procedure.isBypass() ? "(Bypassed)" : "")) %></td>
|
||||
<% } %>
|
||||
</tr>
|
||||
<% } %>
|
||||
<p><%= rit.size() %> region(s) in transition.</p>
|
||||
|
|
Loading…
Reference in New Issue