hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From open...@apache.org
Subject [hbase] 01/14: HBASE-22133 Forward port HBASE-22073 "/rits.jsp throws an exception if no procedure" to branch-2.2+
Date Mon, 08 Apr 2019 07:45:50 GMT
This is an automated email from the ASF dual-hosted git repository.

openinx pushed a commit to branch HBASE-21879
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit c9cc1b5d67c8d750895a12d128688355d702ad6c
Author: zhangduo <zhangduo@apache.org>
AuthorDate: Sat Mar 30 14:19:51 2019 +0800

    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>
---
 .../src/main/resources/hbase-webapps/master/rits.jsp     | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp b/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp
index 78bc32e..17d0090 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp
@@ -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>


Mime
View raw message