This is an automated email from the ASF dual-hosted git repository.
nihaljain pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 5a24c00946e HBASE-28388 Avoid index based field sorting in tablesorter
(#6785)
5a24c00946e is described below
commit 5a24c00946ee1de95efff61679e74e98bdde715f
Author: chandrasekhar-188k
<[email protected]>
AuthorDate: Wed Mar 12 11:37:22 2025 +0530
HBASE-28388 Avoid index based field sorting in tablesorter (#6785)
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 b57e76900df..bcb689577e3 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
@@ -483,41 +483,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 4c9140470b7..0ba28bd6d77 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
@@ -89,11 +89,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
master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") !=
null &&
master.getServerManager().getOnlineServersList().size() > 0 %>
@@ -194,9 +194,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>
@@ -256,10 +256,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>
@@ -305,12 +305,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>
@@ -385,9 +385,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 d837b850462..d62ee063ad3 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
@@ -301,36 +301,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 e77318437e0..1523aa05cf5 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 42a2ca2f06c..65d4fb80c7b 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -316,14 +316,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>
@@ -397,8 +397,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>
@@ -446,9 +446,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>
@@ -930,14 +930,14 @@ for (ColumnFamilyDescriptor family: families) {
<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>
@@ -1026,8 +1026,8 @@ for (ColumnFamilyDescriptor family: families) {
<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>
@@ -1064,9 +1064,9 @@ for (ColumnFamilyDescriptor family: families) {
<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>
@@ -1113,7 +1113,9 @@ for (ColumnFamilyDescriptor family: families) {
<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>
@@ -1305,57 +1307,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'}
}
});
}