HBASE-16657 Expose per-region last major compaction time in RegionServer UI
Signed-off-by: Gary Helmling <garyh@apache.org>
This commit is contained in:
parent
62bc090123
commit
bc9a972451
|
@ -22,6 +22,7 @@
|
||||||
</%args>
|
</%args>
|
||||||
<%import>
|
<%import>
|
||||||
java.util.*;
|
java.util.*;
|
||||||
|
org.apache.commons.lang.time.FastDateFormat;
|
||||||
org.apache.hadoop.hbase.regionserver.HRegionServer;
|
org.apache.hadoop.hbase.regionserver.HRegionServer;
|
||||||
org.apache.hadoop.hbase.util.Bytes;
|
org.apache.hadoop.hbase.util.Bytes;
|
||||||
org.apache.hadoop.hbase.HRegionInfo;
|
org.apache.hadoop.hbase.HRegionInfo;
|
||||||
|
@ -197,6 +198,7 @@
|
||||||
<th>Num. Compacting KVs</th>
|
<th>Num. Compacting KVs</th>
|
||||||
<th>Num. Compacted KVs</th>
|
<th>Num. Compacted KVs</th>
|
||||||
<th>Compaction Progress</th>
|
<th>Compaction Progress</th>
|
||||||
|
<th>Last Major Compaction</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<%for HRegionInfo r: onlineRegions %>
|
<%for HRegionInfo r: onlineRegions %>
|
||||||
|
@ -211,12 +213,19 @@
|
||||||
}
|
}
|
||||||
String displayName = HRegionInfo.getRegionNameAsStringForDisplay(r,
|
String displayName = HRegionInfo.getRegionNameAsStringForDisplay(r,
|
||||||
regionServer.getConfiguration());
|
regionServer.getConfiguration());
|
||||||
|
long lastMajorCompactionTs = load.getLastMajorCompactionTs();
|
||||||
|
String compactTime = "";
|
||||||
|
if (lastMajorCompactionTs > 0) {
|
||||||
|
FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm ZZ");
|
||||||
|
compactTime = fdf.format(lastMajorCompactionTs);
|
||||||
|
}
|
||||||
</%java>
|
</%java>
|
||||||
<td><a href="region.jsp?name=<% r.getEncodedName() %>"><% displayName %></a></td>
|
<td><a href="region.jsp?name=<% r.getEncodedName() %>"><% displayName %></a></td>
|
||||||
<%if load != null %>
|
<%if load != null %>
|
||||||
<td><% load.getTotalCompactingKVs() %></td>
|
<td><% load.getTotalCompactingKVs() %></td>
|
||||||
<td><% load.getCurrentCompactedKVs() %></td>
|
<td><% load.getCurrentCompactedKVs() %></td>
|
||||||
<td><% percentDone %></td>
|
<td><% percentDone %></td>
|
||||||
|
<td><% compactTime %></td>
|
||||||
</%if>
|
</%if>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
|
Loading…
Reference in New Issue