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 2d0da40fff
commit 5e16e23fad
1 changed files with 1 additions and 1 deletions

View File

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