This is an automated email from the ASF dual-hosted git repository.
nihaljain pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.5 by this push:
new 4d788ccad98 HBASE-28388 Avoid index based field sorting in tablesorter
(#6784)
4d788ccad98 is described below
commit 4d788ccad98ea5834a9c4b5439b8209256b6bbc4
Author: chandrasekhar-188k
<[email protected]>
AuthorDate: Wed Mar 12 11:37:38 2025 +0530
HBASE-28388 Avoid index based field sorting in tablesorter (#6784)
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 4745ec7d052..3f4bef32cd7 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
@@ -479,41 +479,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 a3067eeaf8a..6d5a66115ed 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
@@ -85,11 +85,11 @@ Arrays.sort(serverNames);
<thead>
<tr>
<th>ServerName</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>
</tr>
</thead>
<tbody>
@@ -153,9 +153,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>
@@ -215,10 +215,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>
@@ -264,12 +264,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>
@@ -344,9 +344,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 63054c92348..738db5d2348 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
@@ -299,36 +299,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 1a73394a212..65c2dd82e25 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
@@ -92,8 +92,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>
@@ -125,9 +125,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>
@@ -161,12 +161,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>
</tr>
</thead>
@@ -233,8 +233,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>
@@ -282,7 +282,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 9509a37145c..42abc5f64f4 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -317,14 +317,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>
@@ -398,8 +398,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>
@@ -447,9 +447,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>
@@ -933,14 +933,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>
@@ -1029,8 +1029,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>
@@ -1067,9 +1067,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>
@@ -1116,7 +1116,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>
@@ -1308,57 +1310,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'}
}
});
}