HBASE-22160 Add sorting functionality in regionserver web UI for user
Signed-off-by: Toshihiro Suzuki <brfrn169@gmail.com> Signed-off-by: Wellington Chevreuil <wellington.chevreuil@gmail.com>
This commit is contained in:
parent
8cf9f6c361
commit
5b3c954498
|
@ -210,7 +210,42 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
|
|||
</div>
|
||||
</div>
|
||||
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/jquery.tablesorter.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<script src="/static/js/tab.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$.tablesorter.addParser({
|
||||
id: 'filesize',
|
||||
is: function(s) {
|
||||
return s.match(new RegExp( /([\.0-9]+)\ (B|KB|MB|GB|TB)/ ));
|
||||
},
|
||||
format: function(s) {
|
||||
var suf = s.match(new RegExp( /(KB|B|GB|MB|TB)$/ ))[1];
|
||||
var num = parseFloat(s.match( new RegExp( /([\.0-9]+)\ (B|KB|MB|GB|TB)/ ))[0]);
|
||||
switch(suf) {
|
||||
case 'B':
|
||||
return num;
|
||||
case 'KB':
|
||||
return num * 1024;
|
||||
case 'MB':
|
||||
return num * 1024 * 1024;
|
||||
case 'GB':
|
||||
return num * 1024 * 1024 * 1024;
|
||||
case 'TB':
|
||||
return num * 1024 * 1024 * 1024 * 1024;
|
||||
}
|
||||
},
|
||||
type: 'numeric'
|
||||
});
|
||||
$("#baseStatsTable").tablesorter();
|
||||
$("#requestStatsTable").tablesorter();
|
||||
$("#storeStatsTable").tablesorter();
|
||||
$("#compactionStatsTable").tablesorter();
|
||||
$("#memstoreStatsTable").tablesorter();
|
||||
}
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -88,14 +88,17 @@
|
|||
<%args>
|
||||
List<RegionInfo> onlineRegions;
|
||||
</%args>
|
||||
<table class="table table-striped">
|
||||
<table id="baseStatsTable" class="tablesorter table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Region Name</th>
|
||||
<th>Start Key</th>
|
||||
<th>End Key</th>
|
||||
<th>ReplicaID</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%for RegionInfo r: onlineRegions %>
|
||||
<tr>
|
||||
<%java>
|
||||
|
@ -110,6 +113,7 @@
|
|||
<td><% r.getReplicaId() %></td>
|
||||
</tr>
|
||||
</%for>
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
|
@ -117,14 +121,17 @@
|
|||
<%args>
|
||||
List<RegionInfo> onlineRegions;
|
||||
</%args>
|
||||
<table class="table table-striped">
|
||||
<table id="requestStatsTable" class="tablesorter table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Region Name</th>
|
||||
<th>Read Request Count</th>
|
||||
<th>Filtered Read Request Count</th>
|
||||
<th>Write Request Count</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%for RegionInfo r: onlineRegions %>
|
||||
|
||||
<tr>
|
||||
|
@ -141,6 +148,7 @@
|
|||
</%if>
|
||||
</tr>
|
||||
</%for>
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
|
@ -149,7 +157,8 @@
|
|||
<%args>
|
||||
List<RegionInfo> onlineRegions;
|
||||
</%args>
|
||||
<table class="table table-striped">
|
||||
<table id="storeStatsTable" class="tablesorter table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Region Name</th>
|
||||
<th>Num. Stores</th>
|
||||
|
@ -160,7 +169,9 @@
|
|||
<th>Bloom Size</th>
|
||||
<th>Data Locality</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%for RegionInfo r: onlineRegions %>
|
||||
|
||||
<tr>
|
||||
|
@ -185,6 +196,7 @@
|
|||
</%if>
|
||||
</tr>
|
||||
</%for>
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
|
@ -193,15 +205,18 @@
|
|||
<%args>
|
||||
List<RegionInfo> onlineRegions;
|
||||
</%args>
|
||||
<table class="table table-striped">
|
||||
<table id="compactionStatsTable" class="tablesorter table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Region Name</th>
|
||||
<th>Num. Compacting Cells</th>
|
||||
<th>Num. Compacted Cells</th>
|
||||
<th>Compaction Progress</th>
|
||||
<th>Last Major Compaction</th>
|
||||
<th data-date-format="yyyymmdd hhmm zz">Last Major Compaction</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%for RegionInfo r: onlineRegions %>
|
||||
|
||||
<tr>
|
||||
|
@ -215,7 +230,7 @@
|
|||
((float) load.getCurrentCompactedKVs() / load.getTotalCompactingKVs())) + "%";
|
||||
}
|
||||
if (load.getLastMajorCompactionTs() > 0) {
|
||||
FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm ZZ");
|
||||
FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm (ZZ)");
|
||||
compactTime = fdf.format(load.getLastMajorCompactionTs());
|
||||
}
|
||||
}
|
||||
|
@ -231,6 +246,7 @@
|
|||
</%if>
|
||||
</tr>
|
||||
</%for>
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
|
@ -238,12 +254,15 @@
|
|||
<%args>
|
||||
List<RegionInfo> onlineRegions;
|
||||
</%args>
|
||||
<table class="table table-striped">
|
||||
<table id="memstoreStatsTable" class="tablesorter table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Region Name</th>
|
||||
<th>Memstore Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<%for RegionInfo r: onlineRegions %>
|
||||
|
||||
<tr>
|
||||
|
@ -259,5 +278,6 @@
|
|||
</%if>
|
||||
</tr>
|
||||
</%for>
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
|
Loading…
Reference in New Issue