Skip to content

Commit 6c5786f

Browse files
HBASE-28388 Avoid index based field sorting in tablesorter (#6779)
Signed-off-by: Nihal Jain <[email protected]>
1 parent 9e720b3 commit 6c5786f

File tree

5 files changed

+89
-120
lines changed

5 files changed

+89
-120
lines changed

hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon

+7-19
Original file line numberDiff line numberDiff line change
@@ -493,41 +493,29 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
493493
});
494494
$("#baseStatsTable").tablesorter({
495495
headers: {
496-
1: {sorter: 'dateTime'},
497-
4: {sorter: 'separator'},
498-
5: {sorter: 'separator'}
496+
'.cls_dateTime': {sorter: 'dateTime'},
497+
'.cls_separator': {sorter: 'separator'}
499498
}
500499
});
501500
$("#memoryStatsTable").tablesorter({
502501
headers: {
503-
1: {sorter: 'filesize'},
504-
2: {sorter: 'filesize'},
505-
3: {sorter: 'filesize'}
502+
'.cls_filesize': {sorter: 'filesize'}
506503
}
507504
});
508505
$("#requestStatsTable").tablesorter({
509506
headers: {
510-
1: {sorter: 'separator'},
511-
2: {sorter: 'separator'},
512-
3: {sorter: 'separator'},
513-
4: {sorter: 'separator'}
507+
'.cls_separator': {sorter: 'separator'}
514508
}
515509
});
516510
$("#storeStatsTable").tablesorter({
517511
headers: {
518-
1: {sorter: 'separator'},
519-
2: {sorter: 'separator'},
520-
3: {sorter: 'filesize'},
521-
4: {sorter: 'filesize'},
522-
5: {sorter: 'filesize'},
523-
6: {sorter: 'filesize'}
512+
'.cls_separator': {sorter: 'separator'},
513+
'.cls_filesize': {sorter: 'filesize'}
524514
}
525515
});
526516
$("#compactionStatsTable").tablesorter({
527517
headers: {
528-
1: {sorter: 'separator'},
529-
2: {sorter: 'separator'},
530-
3: {sorter: 'separator'}
518+
'.cls_separator': {sorter: 'separator'}
531519
}
532520
});
533521

hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionServerListTmpl.jamon

+19-19
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ Arrays.sort(serverNames);
101101
<tr>
102102
<th>ServerName</th>
103103
<th>State</th>
104-
<th>Start time</th>
104+
<th class="cls_dateTime">Start time</th>
105105
<th>Last contact</th>
106106
<th>Version</th>
107-
<th>Requests Per Second</th>
108-
<th>Num. Regions</th>
107+
<th class="cls_separator">Requests Per Second</th>
108+
<th class="cls_separator">Num. Regions</th>
109109
<%if !master.isInMaintenanceMode() && master.getMasterCoprocessorHost() != null %>
110110
<%if RSGroupUtil.isRSGroupEnabled(master.getConfiguration()) %>
111111
<th style="vertical-align: middle;" rowspan="2">RSGroup</th>
@@ -199,9 +199,9 @@ Arrays.sort(serverNames);
199199
<thead>
200200
<tr>
201201
<th>ServerName</th>
202-
<th>Used Heap</th>
203-
<th>Max Heap</th>
204-
<th>Memstore Size</th>
202+
<th class="cls_filesize">Used Heap</th>
203+
<th class="cls_filesize">Max Heap</th>
204+
<th class="cls_filesize">Memstore Size</th>
205205

206206
</tr>
207207
</thead>
@@ -261,10 +261,10 @@ for (ServerName serverName: serverNames) {
261261
<thead>
262262
<tr>
263263
<th>ServerName</th>
264-
<th>Request Per Second</th>
265-
<th>Read Request Count</th>
266-
<th>Filtered Read Request Count</th>
267-
<th>Write Request Count</th>
264+
<th class="cls_separator">Request Per Second</th>
265+
<th class="cls_separator">Read Request Count</th>
266+
<th class="cls_separator">Filtered Read Request Count</th>
267+
<th class="cls_separator">Write Request Count</th>
268268
</tr>
269269
</thead>
270270
<tbody>
@@ -310,12 +310,12 @@ if (sl != null) {
310310
<thead>
311311
<tr>
312312
<th>ServerName</th>
313-
<th>Num. Stores</th>
314-
<th>Num. Storefiles</th>
315-
<th>Storefile Size Uncompressed</th>
316-
<th>Storefile Size</th>
317-
<th>Index Size</th>
318-
<th>Bloom Size</th>
313+
<th class="cls_separator">Num. Stores</th>
314+
<th class="cls_separator">Num. Storefiles</th>
315+
<th class="cls_filesize">Storefile Size Uncompressed</th>
316+
<th class="cls_filesize">Storefile Size</th>
317+
<th class="cls_filesize">Index Size</th>
318+
<th class="cls_filesize">Bloom Size</th>
319319
</tr>
320320
</thead>
321321
<tbody>
@@ -390,9 +390,9 @@ for (ServerName serverName: serverNames) {
390390
<thead>
391391
<tr>
392392
<th>ServerName</th>
393-
<th>Num. Compacting Cells</th>
394-
<th>Num. Compacted Cells</th>
395-
<th>Remaining Cells</th>
393+
<th class="cls_separator">Num. Compacting Cells</th>
394+
<th class="cls_separator">Num. Compacted Cells</th>
395+
<th class="cls_separator">Remaining Cells</th>
396396
<th>Compaction Progress</th>
397397
</tr>
398398
</thead>

hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon

+7-14
Original file line numberDiff line numberDiff line change
@@ -298,36 +298,29 @@ $(document).ready(function()
298298

299299
$("#baseStatsTable").tablesorter({
300300
headers: {
301-
1: {empty: 'emptyMin'},
302-
2: {empty: 'emptyMax'}
301+
'.cls_emptyMin': {empty: 'emptyMin'},
302+
'.cls_emptyMax': {empty: 'emptyMax'}
303303
}
304304
});
305305
$("#requestStatsTable").tablesorter({
306306
headers: {
307-
1: {sorter: 'separator'},
308-
2: {sorter: 'separator'},
309-
3: {sorter: 'separator'}
307+
'.cls_separator': {sorter: 'separator'}
310308
}
311309
});
312310
$("#storeStatsTable").tablesorter({
313311
headers: {
314-
1: {sorter: 'separator'},
315-
2: {sorter: 'separator'},
316-
3: {sorter: 'filesize'},
317-
4: {sorter: 'filesize'},
318-
5: {sorter: 'filesize'},
319-
6: {sorter: 'filesize'}
312+
'.cls_separator': {sorter: 'separator'},
313+
'.cls_filesize': {sorter: 'filesize'}
320314
}
321315
});
322316
$("#compactionStatsTable").tablesorter({
323317
headers: {
324-
1: {sorter: 'separator'},
325-
2: {sorter: 'separator'}
318+
'.cls_separator': {sorter: 'separator'}
326319
}
327320
});
328321
$("#memstoreStatsTable").tablesorter({
329322
headers: {
330-
1: {sorter: 'filesize'}
323+
'.cls_filesize': {sorter: 'filesize'}
331324
}
332325
});
333326
}

hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon

+14-14
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@
9696
<thead>
9797
<tr>
9898
<th>Region Name</th>
99-
<th>Start Key</th>
100-
<th>End Key</th>
99+
<th class="cls_emptyMin">Start Key</th>
100+
<th class="cls_emptyMax">End Key</th>
101101
<th>ReplicaID</th>
102102
</tr>
103103
</thead>
@@ -129,9 +129,9 @@
129129
<thead>
130130
<tr>
131131
<th>Region Name</th>
132-
<th>Read Request Count</th>
133-
<th>Filtered Read Request Count</th>
134-
<th>Write Request Count</th>
132+
<th class="cls_separator">Read Request Count</th>
133+
<th class="cls_separator">Filtered Read Request Count</th>
134+
<th class="cls_separator">Write Request Count</th>
135135
</tr>
136136
</thead>
137137

@@ -165,12 +165,12 @@
165165
<thead>
166166
<tr>
167167
<th>Region Name</th>
168-
<th>Num. Stores</th>
169-
<th>Num. Storefiles</th>
170-
<th>Storefile Size Uncompressed</th>
171-
<th>Storefile Size</th>
172-
<th>Index Size</th>
173-
<th>Bloom Size</th>
168+
<th class="cls_separator">Num. Stores</th>
169+
<th class="cls_separator">Num. Storefiles</th>
170+
<th class="cls_filesize">Storefile Size Uncompressed</th>
171+
<th class="cls_filesize">Storefile Size</th>
172+
<th class="cls_filesize">Index Size</th>
173+
<th class="cls_filesize">Bloom Size</th>
174174
<th>Data Locality</th>
175175
<th>Len Of Biggest Cell</th>
176176
<th>% Cached</th>
@@ -256,8 +256,8 @@
256256
<thead>
257257
<tr>
258258
<th>Region Name</th>
259-
<th>Num. Compacting Cells</th>
260-
<th>Num. Compacted Cells</th>
259+
<th class="cls_separator">Num. Compacting Cells</th>
260+
<th class="cls_separator">Num. Compacted Cells</th>
261261
<th>Compaction Progress</th>
262262
<th data-date-format="yyyymmdd hhmm zz">Last Major Compaction</th>
263263
</tr>
@@ -305,7 +305,7 @@
305305
<thead>
306306
<tr>
307307
<th>Region Name</th>
308-
<th>Memstore Size</th>
308+
<th class="cls_filesize">Memstore Size</th>
309309
</tr>
310310
</thead>
311311

0 commit comments

Comments
 (0)