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>
|
||||||
</div>
|
</div>
|
||||||
<script src="/static/js/jquery.min.js" type="text/javascript"></script>
|
<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/bootstrap.min.js" type="text/javascript"></script>
|
||||||
<script src="/static/js/tab.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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -88,14 +88,17 @@
|
||||||
<%args>
|
<%args>
|
||||||
List<RegionInfo> onlineRegions;
|
List<RegionInfo> onlineRegions;
|
||||||
</%args>
|
</%args>
|
||||||
<table class="table table-striped">
|
<table id="baseStatsTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Region Name</th>
|
<th>Region Name</th>
|
||||||
<th>Start Key</th>
|
<th>Start Key</th>
|
||||||
<th>End Key</th>
|
<th>End Key</th>
|
||||||
<th>ReplicaID</th>
|
<th>ReplicaID</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<%for RegionInfo r: onlineRegions %>
|
<%for RegionInfo r: onlineRegions %>
|
||||||
<tr>
|
<tr>
|
||||||
<%java>
|
<%java>
|
||||||
|
@ -110,6 +113,7 @@
|
||||||
<td><% r.getReplicaId() %></td>
|
<td><% r.getReplicaId() %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
@ -117,14 +121,17 @@
|
||||||
<%args>
|
<%args>
|
||||||
List<RegionInfo> onlineRegions;
|
List<RegionInfo> onlineRegions;
|
||||||
</%args>
|
</%args>
|
||||||
<table class="table table-striped">
|
<table id="requestStatsTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Region Name</th>
|
<th>Region Name</th>
|
||||||
<th>Read Request Count</th>
|
<th>Read Request Count</th>
|
||||||
<th>Filtered Read Request Count</th>
|
<th>Filtered Read Request Count</th>
|
||||||
<th>Write Request Count</th>
|
<th>Write Request Count</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<%for RegionInfo r: onlineRegions %>
|
<%for RegionInfo r: onlineRegions %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -141,6 +148,7 @@
|
||||||
</%if>
|
</%if>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
@ -149,7 +157,8 @@
|
||||||
<%args>
|
<%args>
|
||||||
List<RegionInfo> onlineRegions;
|
List<RegionInfo> onlineRegions;
|
||||||
</%args>
|
</%args>
|
||||||
<table class="table table-striped">
|
<table id="storeStatsTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Region Name</th>
|
<th>Region Name</th>
|
||||||
<th>Num. Stores</th>
|
<th>Num. Stores</th>
|
||||||
|
@ -160,7 +169,9 @@
|
||||||
<th>Bloom Size</th>
|
<th>Bloom Size</th>
|
||||||
<th>Data Locality</th>
|
<th>Data Locality</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<%for RegionInfo r: onlineRegions %>
|
<%for RegionInfo r: onlineRegions %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -185,6 +196,7 @@
|
||||||
</%if>
|
</%if>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
@ -193,15 +205,18 @@
|
||||||
<%args>
|
<%args>
|
||||||
List<RegionInfo> onlineRegions;
|
List<RegionInfo> onlineRegions;
|
||||||
</%args>
|
</%args>
|
||||||
<table class="table table-striped">
|
<table id="compactionStatsTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Region Name</th>
|
<th>Region Name</th>
|
||||||
<th>Num. Compacting Cells</th>
|
<th>Num. Compacting Cells</th>
|
||||||
<th>Num. Compacted Cells</th>
|
<th>Num. Compacted Cells</th>
|
||||||
<th>Compaction Progress</th>
|
<th>Compaction Progress</th>
|
||||||
<th>Last Major Compaction</th>
|
<th data-date-format="yyyymmdd hhmm zz">Last Major Compaction</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<%for RegionInfo r: onlineRegions %>
|
<%for RegionInfo r: onlineRegions %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -215,7 +230,7 @@
|
||||||
((float) load.getCurrentCompactedKVs() / load.getTotalCompactingKVs())) + "%";
|
((float) load.getCurrentCompactedKVs() / load.getTotalCompactingKVs())) + "%";
|
||||||
}
|
}
|
||||||
if (load.getLastMajorCompactionTs() > 0) {
|
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());
|
compactTime = fdf.format(load.getLastMajorCompactionTs());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -231,6 +246,7 @@
|
||||||
</%if>
|
</%if>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
@ -238,12 +254,15 @@
|
||||||
<%args>
|
<%args>
|
||||||
List<RegionInfo> onlineRegions;
|
List<RegionInfo> onlineRegions;
|
||||||
</%args>
|
</%args>
|
||||||
<table class="table table-striped">
|
<table id="memstoreStatsTable" class="tablesorter table table-striped">
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Region Name</th>
|
<th>Region Name</th>
|
||||||
<th>Memstore Size</th>
|
<th>Memstore Size</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
<%for RegionInfo r: onlineRegions %>
|
<%for RegionInfo r: onlineRegions %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -259,5 +278,6 @@
|
||||||
</%if>
|
</%if>
|
||||||
</tr>
|
</tr>
|
||||||
</%for>
|
</%for>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</%def>
|
</%def>
|
||||||
|
|
Loading…
Reference in New Issue