Revert "HBASE-22073 /rits.jsp throws an exception if no procedure"

This reverts commit 85c17e711c.
This commit is contained in:
zhangduo 2019-03-30 09:34:47 +08:00
parent 8bceaf7f0b
commit b1edddcf89
1 changed files with 4 additions and 14 deletions

View File

@ -22,11 +22,10 @@
import="java.util.Collections" import="java.util.Collections"
import="java.util.Comparator" import="java.util.Comparator"
import="java.util.List" import="java.util.List"
import="java.util.stream.Collectors"
import="org.apache.hadoop.hbase.master.HMaster" import="org.apache.hadoop.hbase.master.HMaster"
import="org.apache.hadoop.hbase.master.assignment.RegionStateNode" 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); HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
List<RegionStateNode> rit = master.getAssignmentManager().getRegionsInTransition(); List<RegionStateNode> rit = master.getAssignmentManager().getRegionsInTransition();
@ -87,17 +86,8 @@
<td><%= regionStateNode.getRegionInfo().getEncodedName() %></td> <td><%= regionStateNode.getRegionInfo().getEncodedName() %></td>
<td><%= regionStateNode.getRegionInfo().getTable() %></td> <td><%= regionStateNode.getRegionInfo().getTable() %></td>
<td><%= regionStateNode.getState() %></td> <td><%= regionStateNode.getState() %></td>
<% <td><%= regionStateNode.getProcedure().getProcId() %></td>
RegionTransitionProcedure procedure = regionStateNode.getProcedure(); <td><%= escapeXml(regionStateNode.getProcedure().getState().toString() + (regionStateNode.getProcedure().isBypass() ? "(Bypassed)" : "")) %></td>
if (procedure == null) {
%>
<td></td>
<td></td>
<% } else { %>
<td><%= procedure.getProcId() %></td>
<td><%= escapeXml(procedure.getState().toString() + (procedure.isBypass() ? "(Bypassed)" : "")) %></td>
<% } %>
</tr> </tr>
<% } %> <% } %>
<p><%= rit.size() %> region(s) in transition.</p> <p><%= rit.size() %> region(s) in transition.</p>
@ -127,4 +117,4 @@
</p> </p>
</div> </div>
</div> </div>
<% } %> <% } %>