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 17d0090cb6e..3fc960ee0c6 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/rits.jsp
@@ -21,11 +21,17 @@
import="static org.apache.commons.lang3.StringEscapeUtils.escapeXml"
import="java.util.Collections"
import="java.util.Comparator"
+ import="java.util.ArrayList"
import="java.util.List"
+ import="java.util.HashMap"
+ import="java.util.Map"
import="java.util.stream.Collectors"
import="org.apache.hadoop.hbase.master.HMaster"
+ import="org.apache.hadoop.hbase.master.RegionState"
import="org.apache.hadoop.hbase.master.assignment.RegionStateNode"
import="org.apache.hadoop.hbase.master.assignment.TransitRegionStateProcedure"
+ import="org.apache.hadoop.hbase.util.GsonUtil"
+ import="org.apache.hbase.thirdparty.com.google.gson.Gson"
%>
<%
HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER);
@@ -69,6 +75,7 @@
@@ -79,14 +86,18 @@
Region |
Table |
RegionState |
+ Server |
Procedure |
ProcedureState |
+ Start Time |
+ Duration (ms) |
<% for (RegionStateNode regionStateNode : rit) { %>
<%= regionStateNode.getRegionInfo().getEncodedName() %> |
<%= regionStateNode.getRegionInfo().getTable() %> |
<%= regionStateNode.getState() %> |
+ <%= regionStateNode.getRegionLocation().getServerName() %> |
<%
TransitRegionStateProcedure procedure = regionStateNode.getProcedure();
@@ -98,6 +109,10 @@
<%= procedure.getProcId() %> |
<%= escapeXml(procedure.getState().toString() + (procedure.isBypass() ? "(Bypassed)" : "")) %> |
<% } %>
+
+ <% RegionState rs = regionStateNode.toRegionState(); %>
+ <%= rs.getStamp() %> |
+ <%= System.currentTimeMillis() - rs.getStamp() %> |
<% } %>
<%= rit.size() %> region(s) in transition.
@@ -107,7 +122,30 @@
<% } %>
-
+<% } else if (format.equals("json")) { %>
+<%
+ Gson GSON = GsonUtil.createGson().create();
+ Map>> map = new HashMap<>();
+ List