HBASE-22073 /rits.jsp throws an exception if no procedure
This commit is contained in:
parent
541f223de4
commit
8bac547559
|
@ -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.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>
|
||||
|
@ -117,4 +127,4 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
|
Loading…
Reference in New Issue