Skip to content

Commit d33e8f7

Browse files
chandrasekhar-188kmokai87
authored andcommitted
HBASE-28388 Avoid index based field sorting in tablesorter (apache#6779)
Signed-off-by: Nihal Jain <[email protected]> (cherry picked from commit 6c5786f)
1 parent 4510b4c commit d33e8f7

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

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -494,41 +494,29 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
494494
});
495495
$("#baseStatsTable").tablesorter({
496496
headers: {
497-
1: {sorter: 'dateTime'},
498-
4: {sorter: 'separator'},
499-
5: {sorter: 'separator'}
497+
'.cls_dateTime': {sorter: 'dateTime'},
498+
'.cls_separator': {sorter: 'separator'}
500499
}
501500
});
502501
$("#memoryStatsTable").tablesorter({
503502
headers: {
504-
1: {sorter: 'filesize'},
505-
2: {sorter: 'filesize'},
506-
3: {sorter: 'filesize'}
503+
'.cls_filesize': {sorter: 'filesize'}
507504
}
508505
});
509506
$("#requestStatsTable").tablesorter({
510507
headers: {
511-
1: {sorter: 'separator'},
512-
2: {sorter: 'separator'},
513-
3: {sorter: 'separator'},
514-
4: {sorter: 'separator'}
508+
'.cls_separator': {sorter: 'separator'}
515509
}
516510
});
517511
$("#storeStatsTable").tablesorter({
518512
headers: {
519-
1: {sorter: 'separator'},
520-
2: {sorter: 'separator'},
521-
3: {sorter: 'filesize'},
522-
4: {sorter: 'filesize'},
523-
5: {sorter: 'filesize'},
524-
6: {sorter: 'filesize'}
513+
'.cls_separator': {sorter: 'separator'},
514+
'.cls_filesize': {sorter: 'filesize'}
525515
}
526516
});
527517
$("#compactionStatsTable").tablesorter({
528518
headers: {
529-
1: {sorter: 'separator'},
530-
2: {sorter: 'separator'},
531-
3: {sorter: 'separator'}
519+
'.cls_separator': {sorter: 'separator'}
532520
}
533521
});
534522

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 master.getMasterCoprocessorHost().findCoprocessor("RSGroupAdminEndpoint") != null &&
111111
master.getServerManager().getOnlineServersList().size() > 0 %>
@@ -206,9 +206,9 @@ Arrays.sort(serverNames);
206206
<thead>
207207
<tr>
208208
<th>ServerName</th>
209-
<th>Used Heap</th>
210-
<th>Max Heap</th>
211-
<th>Memstore Size</th>
209+
<th class="cls_filesize">Used Heap</th>
210+
<th class="cls_filesize">Max Heap</th>
211+
<th class="cls_filesize">Memstore Size</th>
212212

213213
</tr>
214214
</thead>
@@ -268,10 +268,10 @@ for (ServerName serverName: serverNames) {
268268
<thead>
269269
<tr>
270270
<th>ServerName</th>
271-
<th>Request Per Second</th>
272-
<th>Read Request Count</th>
273-
<th>Filtered Read Request Count</th>
274-
<th>Write Request Count</th>
271+
<th class="cls_separator">Request Per Second</th>
272+
<th class="cls_separator">Read Request Count</th>
273+
<th class="cls_separator">Filtered Read Request Count</th>
274+
<th class="cls_separator">Write Request Count</th>
275275
</tr>
276276
</thead>
277277
<tbody>
@@ -317,12 +317,12 @@ if (sl != null) {
317317
<thead>
318318
<tr>
319319
<th>ServerName</th>
320-
<th>Num. Stores</th>
321-
<th>Num. Storefiles</th>
322-
<th>Storefile Size Uncompressed</th>
323-
<th>Storefile Size</th>
324-
<th>Index Size</th>
325-
<th>Bloom Size</th>
320+
<th class="cls_separator">Num. Stores</th>
321+
<th class="cls_separator">Num. Storefiles</th>
322+
<th class="cls_filesize">Storefile Size Uncompressed</th>
323+
<th class="cls_filesize">Storefile Size</th>
324+
<th class="cls_filesize">Index Size</th>
325+
<th class="cls_filesize">Bloom Size</th>
326326
</tr>
327327
</thead>
328328
<tbody>
@@ -397,9 +397,9 @@ for (ServerName serverName: serverNames) {
397397
<thead>
398398
<tr>
399399
<th>ServerName</th>
400-
<th>Num. Compacting Cells</th>
401-
<th>Num. Compacted Cells</th>
402-
<th>Remaining Cells</th>
400+
<th class="cls_separator">Num. Compacting Cells</th>
401+
<th class="cls_separator">Num. Compacted Cells</th>
402+
<th class="cls_separator">Remaining Cells</th>
403403
<th>Compaction Progress</th>
404404
</tr>
405405
</thead>

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

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

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