From 5e16e23fadc6cbd9474f6924be1a7ce538782bbe Mon Sep 17 00:00:00 2001 From: Reid Chan Date: Wed, 1 Nov 2017 18:39:55 +0800 Subject: [PATCH] HBASE-17065 Perform more effective sorting for RPC Handler Tasks Signed-off-by: tedyu --- .../org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon index 986bc3a4555..ca3a0a1033b 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/common/TaskMonitorTmpl.jamon @@ -30,7 +30,7 @@ String format = "html"; // apply requested filter List 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; <%if format.equals("json")%>