HBASE-17065 Perform more effective sorting for RPC Handler Tasks

Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
Reid Chan 2017-11-01 18:39:55 +08:00 committed by tedyu
parent 261cb8a7e4
commit 8a3db6eaaf
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ String format = "html";
// apply requested filter // apply requested filter
List<? extends MonitoredTask> tasks = taskMonitor.getTasks(filter); List<? extends MonitoredTask> tasks = taskMonitor.getTasks(filter);
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
Collections.reverse(tasks); Collections.sort(tasks, (t1, t2) -> Long.compare(t1.getStateTime(), t2.getStateTime()));
boolean first = true; boolean first = true;
</%java> </%java>
<%if format.equals("json")%> <%if format.equals("json")%>