Skip to content

Commit f774819

Browse files
HBASE-29176 Avoid index based field sorting in tablesorter in master-status page
1 parent 98312d3 commit f774819

2 files changed

Lines changed: 26 additions & 38 deletions

File tree

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

Lines changed: 7 additions & 19 deletions
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

Lines changed: 19 additions & 19 deletions
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>

0 commit comments

Comments
 (0)