You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2021/09/27 12:04:05 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #2283: Add Active Compactions page to Monitor

milleruntime commented on a change in pull request #2283:
URL: https://github.com/apache/accumulo/pull/2283#discussion_r716625052



##########
File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
##########
@@ -553,7 +565,24 @@ private ServletHolder getRestServlet() {
     }
   }
 
+  public static class CompactionStats {
+    public final long count;
+    public final Long oldest;
+    public final long fetched;
+
+    CompactionStats(List<ActiveCompaction> active) {
+      this.count = active.size();
+      long oldest = -1;
+      for (ActiveCompaction a : active) {
+        oldest = Math.max(oldest, a.age);
+      }
+      this.oldest = oldest < 0 ? null : oldest;
+      this.fetched = System.currentTimeMillis();

Review comment:
       A lot of this code was copy and pasted but I can do a change replacing `System.currentTimeMillis()` in the Monitor.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org