This is an automated email from the ASF dual-hosted git repository.
nihaljain pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new df34936c0e8 HBASE-28388 Avoid index based field sorting in tablesorter
(#6779)
df34936c0e8 is described below
commit df34936c0e844cc00c56d17beba8248811aa9bce
Author: chandrasekhar-188k
<[email protected]>
AuthorDate: Wed Mar 12 11:30:33 2025 +0530
HBASE-28388 Avoid index based field sorting in tablesorter (#6779)
Signed-off-by: Nihal Jain <[email protected]>
(cherry picked from commit 6c5786f77eb403377d22b5fef687a9b131e92508)
---
.../hbase/tmpl/master/MasterStatusTmpl.jamon | 26 ++----
.../hbase/tmpl/master/RegionServerListTmpl.jamon | 38 ++++-----
.../hbase/tmpl/regionserver/RSStatusTmpl.jamon | 21 ++---
.../hbase/tmpl/regionserver/RegionListTmpl.jamon | 28 +++----
.../main/resources/hbase-webapps/master/table.jsp | 96 ++++++++++------------
5 files changed, 89 insertions(+), 120 deletions(-)
diff --git
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index 04387e12d54..2a5b9e5a5fb 100644
---
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -493,41 +493,29 @@ AssignmentManager assignmentManager =
master.getAssignmentManager();
});
$("#baseStatsTable").tablesorter({
headers: {
- 1: {sorter: 'dateTime'},
- 4: {sorter: 'separator'},
- 5: {sorter: 'separator'}
+ '.cls_dateTime': {sorter: 'dateTime'},
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#memoryStatsTable").tablesorter({
headers: {
- 1: {sorter: 'filesize'},
- 2: {sorter: 'filesize'},
- 3: {sorter: 'filesize'}
+ '.cls_filesize': {sorter: 'filesize'}
}
});
$("#requestStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'},
- 4: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#storeStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'},
- 3: {sorter: 'filesize'},
- 4: {sorter: 'filesize'},
- 5: {sorter: 'filesize'},
- 6: {sorter: 'filesize'}
+ '.cls_separator': {sorter: 'separator'},
+ '.cls_filesize': {sorter: 'filesize'}
}
});
$("#compactionStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
diff --git
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon
index adf5443cf08..c748f416217 100644
---
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon
+++
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon
@@ -101,11 +101,11 @@ Arrays.sort(serverNames);
<tr>
<th>ServerName</th>
<th>State</th>
- <th>Start time</th>
+ <th class="cls_dateTime">Start time</th>
<th>Last contact</th>
<th>Version</th>
- <th>Requests Per Second</th>
- <th>Num. Regions</th>
+ <th class="cls_separator">Requests Per Second</th>
+ <th class="cls_separator">Num. Regions</th>
<%if !master.isInMaintenanceMode() && master.getMasterCoprocessorHost() !=
null %>
<%if RSGroupUtil.isRSGroupEnabled(master.getConfiguration()) %>
<th style="vertical-align: middle;" rowspan="2">RSGroup</th>
@@ -199,9 +199,9 @@ Arrays.sort(serverNames);
<thead>
<tr>
<th>ServerName</th>
- <th>Used Heap</th>
- <th>Max Heap</th>
- <th>Memstore Size</th>
+ <th class="cls_filesize">Used Heap</th>
+ <th class="cls_filesize">Max Heap</th>
+ <th class="cls_filesize">Memstore Size</th>
</tr>
</thead>
@@ -261,10 +261,10 @@ for (ServerName serverName: serverNames) {
<thead>
<tr>
<th>ServerName</th>
- <th>Request Per Second</th>
- <th>Read Request Count</th>
- <th>Filtered Read Request Count</th>
- <th>Write Request Count</th>
+ <th class="cls_separator">Request Per Second</th>
+ <th class="cls_separator">Read Request Count</th>
+ <th class="cls_separator">Filtered Read Request Count</th>
+ <th class="cls_separator">Write Request Count</th>
</tr>
</thead>
<tbody>
@@ -310,12 +310,12 @@ if (sl != null) {
<thead>
<tr>
<th>ServerName</th>
- <th>Num. Stores</th>
- <th>Num. Storefiles</th>
- <th>Storefile Size Uncompressed</th>
- <th>Storefile Size</th>
- <th>Index Size</th>
- <th>Bloom Size</th>
+ <th class="cls_separator">Num. Stores</th>
+ <th class="cls_separator">Num. Storefiles</th>
+ <th class="cls_filesize">Storefile Size Uncompressed</th>
+ <th class="cls_filesize">Storefile Size</th>
+ <th class="cls_filesize">Index Size</th>
+ <th class="cls_filesize">Bloom Size</th>
</tr>
</thead>
<tbody>
@@ -390,9 +390,9 @@ for (ServerName serverName: serverNames) {
<thead>
<tr>
<th>ServerName</th>
- <th>Num. Compacting Cells</th>
- <th>Num. Compacted Cells</th>
- <th>Remaining Cells</th>
+ <th class="cls_separator">Num. Compacting Cells</th>
+ <th class="cls_separator">Num. Compacted Cells</th>
+ <th class="cls_separator">Remaining Cells</th>
<th>Compaction Progress</th>
</tr>
</thead>
diff --git
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
index c5d0c4dab10..5e05355d1d3 100644
---
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
+++
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
@@ -298,36 +298,29 @@ $(document).ready(function()
$("#baseStatsTable").tablesorter({
headers: {
- 1: {empty: 'emptyMin'},
- 2: {empty: 'emptyMax'}
+ '.cls_emptyMin': {empty: 'emptyMin'},
+ '.cls_emptyMax': {empty: 'emptyMax'}
}
});
$("#requestStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#storeStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'},
- 3: {sorter: 'filesize'},
- 4: {sorter: 'filesize'},
- 5: {sorter: 'filesize'},
- 6: {sorter: 'filesize'}
+ '.cls_separator': {sorter: 'separator'},
+ '.cls_filesize': {sorter: 'filesize'}
}
});
$("#compactionStatsTable").tablesorter({
headers: {
- 1: {sorter: 'separator'},
- 2: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#memstoreStatsTable").tablesorter({
headers: {
- 1: {sorter: 'filesize'}
+ '.cls_filesize': {sorter: 'filesize'}
}
});
}
diff --git
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
index dc3380ac5f9..c4b947308ba 100644
---
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
+++
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
@@ -96,8 +96,8 @@
<thead>
<tr>
<th>Region Name</th>
- <th>Start Key</th>
- <th>End Key</th>
+ <th class="cls_emptyMin">Start Key</th>
+ <th class="cls_emptyMax">End Key</th>
<th>ReplicaID</th>
</tr>
</thead>
@@ -129,9 +129,9 @@
<thead>
<tr>
<th>Region Name</th>
- <th>Read Request Count</th>
- <th>Filtered Read Request Count</th>
- <th>Write Request Count</th>
+ <th class="cls_separator">Read Request Count</th>
+ <th class="cls_separator">Filtered Read Request Count</th>
+ <th class="cls_separator">Write Request Count</th>
</tr>
</thead>
@@ -165,12 +165,12 @@
<thead>
<tr>
<th>Region Name</th>
- <th>Num. Stores</th>
- <th>Num. Storefiles</th>
- <th>Storefile Size Uncompressed</th>
- <th>Storefile Size</th>
- <th>Index Size</th>
- <th>Bloom Size</th>
+ <th class="cls_separator">Num. Stores</th>
+ <th class="cls_separator">Num. Storefiles</th>
+ <th class="cls_filesize">Storefile Size Uncompressed</th>
+ <th class="cls_filesize">Storefile Size</th>
+ <th class="cls_filesize">Index Size</th>
+ <th class="cls_filesize">Bloom Size</th>
<th>Data Locality</th>
<th>Len Of Biggest Cell</th>
<th>% Cached</th>
@@ -256,8 +256,8 @@
<thead>
<tr>
<th>Region Name</th>
- <th>Num. Compacting Cells</th>
- <th>Num. Compacted Cells</th>
+ <th class="cls_separator">Num. Compacting Cells</th>
+ <th class="cls_separator">Num. Compacted Cells</th>
<th>Compaction Progress</th>
<th data-date-format="yyyymmdd hhmm zz">Last Major Compaction</th>
</tr>
@@ -305,7 +305,7 @@
<thead>
<tr>
<th>Region Name</th>
- <th>Memstore Size</th>
+ <th class="cls_filesize">Memstore Size</th>
</tr>
</thead>
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index e6a5c9acf07..5c1f952f7e4 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -312,14 +312,14 @@
<tr>
<th>Name</th>
<th>Region Server</th>
- <th>ReadRequests</th>
- <th>WriteRequests</th>
- <th>Uncompressed StoreFileSize</th>
- <th>StorefileSize</th>
- <th>Num.Storefiles</th>
- <th>MemSize</th>
- <th>Start Key</th>
- <th>End Key</th>
+ <th class="cls_separator">ReadRequests</th>
+ <th class="cls_separator">WriteRequests</th>
+ <th class="cls_filesize">Uncompressed StoreFileSize</th>
+ <th class="cls_filesize">StorefileSize</th>
+ <th class="cls_separator">Num.Storefiles</th>
+ <th class="cls_filesize">MemSize</th>
+ <th class="cls_emptyMin">Start Key</th>
+ <th class="cls_emptyMax">End Key</th>
<th>ReplicaID</th>
</tr>
</thead>
@@ -394,8 +394,8 @@
<tr>
<th>Name</th>
<th>Region Server</th>
- <th>Locality</th>
- <th>LocalityForSsd</th>
+ <th class="cls_separator">Locality</th>
+ <th class="cls_separator">LocalityForSsd</th>
</tr>
</thead>
<tbody>
@@ -444,9 +444,9 @@
<tr>
<th>Name</th>
<th>Region Server</th>
- <th>Num. Compacting Cells</th>
- <th>Num. Compacted Cells</th>
- <th>Remaining Cells</th>
+ <th class="cls_separator">Num. Compacting Cells</th>
+ <th class="cls_separator">Num. Compacted Cells</th>
+ <th class="cls_separator">Remaining Cells</th>
<th>Compaction Progress</th>
</tr>
</thead>
@@ -950,14 +950,14 @@
<tr>
<th>Name(<%= String.format("%,1d", regions.size())%>)</th>
<th>Region Server</th>
- <th>ReadRequests<br>(<%= String.format("%,1d",
totalReadReq)%>)</th>
- <th>WriteRequests<br>(<%= String.format("%,1d",
totalWriteReq)%>)</th>
- <th>Uncompressed StoreFileSize<br>(<%=
totalSizeUncompressedStr %>)</th>
- <th>StorefileSize<br>(<%= totalSizeStr %>)</th>
- <th>Num.Storefiles<br>(<%= String.format("%,1d",
totalStoreFileCount)%>)</th>
- <th>MemSize<br>(<%= totalMemSizeStr %>)</th>
- <th>Start Key</th>
- <th>End Key</th>
+ <th class="cls_separator">ReadRequests<br>(<%=
String.format("%,1d", totalReadReq)%>)</th>
+ <th class="cls_separator">WriteRequests<br>(<%=
String.format("%,1d", totalWriteReq)%>)</th>
+ <th class="cls_filesize">Uncompressed StoreFileSize<br>(<%=
totalSizeUncompressedStr %>)</th>
+ <th class="cls_filesize">StorefileSize<br>(<%= totalSizeStr
%>)</th>
+ <th class="cls_separator">Num.Storefiles<br>(<%=
String.format("%,1d", totalStoreFileCount)%>)</th>
+ <th class="cls_filesize">MemSize<br>(<%= totalMemSizeStr
%>)</th>
+ <th class="cls_emptyMin">Start Key</th>
+ <th class="cls_emptyMax">End Key</th>
<th>Region State</th>
<th>ReplicaID</th>
</tr>
@@ -1046,8 +1046,8 @@
<tr>
<th>Name(<%= String.format("%,1d", regions.size())%>)</th>
<th>Region Server</th>
- <th>Locality<br>(<%= totalLocality %>)</th>
- <th>LocalityForSsd<br>(<%= totalLocalityForSsd %>)</th>
+ <th class="cls_separator">Locality<br>(<%= totalLocality
%>)</th>
+ <th class="cls_separator">LocalityForSsd<br>(<%=
totalLocalityForSsd %>)</th>
</tr>
</thead>
<tbody>
@@ -1084,9 +1084,9 @@
<tr>
<th>Name(<%= String.format("%,1d", regions.size())%>)</th>
<th>Region Server</th>
- <th>Num. Compacting Cells<br>(<%= String.format("%,1d",
totalCompactingCells)%>)</th>
- <th>Num. Compacted Cells<br>(<%= String.format("%,1d",
totalCompactedCells)%>)</th>
- <th>Remaining Cells<br>(<%= String.format("%,1d",
totalCompactingCells-totalCompactedCells)%>)</th>
+ <th class="cls_separator">Num. Compacting Cells<br>(<%=
String.format("%,1d", totalCompactingCells)%>)</th>
+ <th class="cls_separator">Num. Compacted Cells<br>(<%=
String.format("%,1d", totalCompactedCells)%>)</th>
+ <th class="cls_separator">Remaining Cells<br>(<%=
String.format("%,1d", totalCompactingCells-totalCompactedCells)%>)</th>
<th>Compaction Progress<br>(<%= totalCompactionProgress
%>)</th>
</tr>
</thead>
@@ -1137,7 +1137,9 @@
<table id="regionServerTable" class="tablesorter table table-striped">
<thead>
<tr>
- <th>Region Server</th><th>Region Count</th><th>Primary Region Count</th>
+ <th>Region Server</th>
+ <th class="cls_separator">Region Count</th>
+ <th>Primary Region Count</th>
</tr>
</thead>
@@ -1323,57 +1325,43 @@ $(document).ready(function()
});
$("#regionServerTable").tablesorter({
headers: {
- 1: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#tableBaseStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'},
- 4: {sorter: 'filesize'},
- 5: {sorter: 'filesize'},
- 6: {sorter: 'separator'},
- 7: {sorter: 'filesize'},
- 8: {empty: 'emptyMin'},
- 9: {empty: 'emptyMax'}
+ '.cls_separator': {sorter: 'separator'},
+ '.cls_filesize': {sorter: 'filesize'},
+ '.cls_emptyMin': {empty: 'emptyMin'},
+ '.cls_emptyMax': {empty: 'emptyMax'}
}
});
$("#metaTableBaseStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'},
- 4: {sorter: 'filesize'},
- 5: {sorter: 'filesize'},
- 6: {sorter: 'separator'},
- 7: {sorter: 'filesize'},
- 8: {empty: 'emptyMin'},
- 9: {empty: 'emptyMax'}
+ '.cls_separator': {sorter: 'separator'},
+ '.cls_filesize': {sorter: 'filesize'},
+ '.cls_emptyMin': {empty: 'emptyMin'},
+ '.cls_emptyMax': {empty: 'emptyMax'}
}
});
$("#tableLocalityStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#metaTableLocalityStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#tableCompactStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'},
- 4: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
$("#metaTableCompactStatsTable").tablesorter({
headers: {
- 2: {sorter: 'separator'},
- 3: {sorter: 'separator'},
- 4: {sorter: 'separator'}
+ '.cls_separator': {sorter: 'separator'}
}
});
}