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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to