HBASE-22073 /rits.jsp throws an exception if no procedure
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
0fd73b5852
commit
c6e0826679
|
@ -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.RegionStates.RegionStateNode"
|
||||
import="org.apache.hadoop.hbase.master.assignment.RegionTransitionProcedure"
|
||||
%>
|
||||
<%@ 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>
|
||||
<%
|
||||
RegionTransitionProcedure 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