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/29 19:36:56 UTC

[GitHub] [accumulo] milleruntime opened a new pull request #2294: Improve fetching scans and compactions in Monitor

milleruntime opened a new pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294


   * Drop fetchScans and fetchCompactions threads and just let the page
   refresh get the data as needed. Created constant to prevent fetching
   more then once a minute. Created time constant for age off
   * Replace active scans table with datatables and add fetched column
   * Add fetched column to Active compactions table
   * Refactored fetch methods to catch thrift error and log.
   * Made entry point methods getCompactions and getScans synchronized to
   allow removal of synchronized code blocks.


-- 
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



[GitHub] [accumulo] milleruntime commented on pull request #2294: Improve fetching scans and compactions in Monitor

Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294#issuecomment-930491615


   Screenshots of the 2 pages:
   ![active-compactions](https://user-images.githubusercontent.com/11872539/135338427-5d121a2c-8a7a-489b-9082-297cdbc33051.png)
   ![scans](https://user-images.githubusercontent.com/11872539/135338439-f0c6c64b-2655-4e9c-905b-699f33069253.png)
   
   
   


-- 
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



[GitHub] [accumulo] milleruntime commented on a change in pull request #2294: Improve fetching scans and compactions in Monitor

Posted by GitBox <gi...@apache.org>.
milleruntime commented on a change in pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294#discussion_r719685291



##########
File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
##########
@@ -577,63 +556,79 @@ private ServletHolder getRestServlet() {
         oldest = Math.max(oldest, a.age);
       }
       this.oldest = oldest < 0 ? null : oldest;
+      // use clock time for date friendly display
       this.fetched = System.currentTimeMillis();
     }
   }
 
   private final Map<HostAndPort,ScanStats> allScans = new HashMap<>();
   private final Map<HostAndPort,CompactionStats> allCompactions = new HashMap<>();
   private final RecentLogs recentLogs = new RecentLogs();
+  private long scansFetchedNanos = 0L;
+  private long compactsFetchedNanos = 0L;
+  private final long fetchTimeNanos = TimeUnit.NANOSECONDS.convert(1, TimeUnit.MINUTES);
+  private final long ageOffEntriesMillis = TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES);

Review comment:
       Oh cool! I didn't know that. Thanks for sharing. I like that better, I'll change it.




-- 
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



[GitHub] [accumulo] milleruntime merged pull request #2294: Improve fetching scans and compactions in Monitor

Posted by GitBox <gi...@apache.org>.
milleruntime merged pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294


   


-- 
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



[GitHub] [accumulo] milleruntime commented on pull request #2294: Improve fetching scans and compactions in Monitor

Posted by GitBox <gi...@apache.org>.
milleruntime commented on pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294#issuecomment-930491615


   Screenshots of the 2 pages:
   ![active-compactions](https://user-images.githubusercontent.com/11872539/135338427-5d121a2c-8a7a-489b-9082-297cdbc33051.png)
   ![scans](https://user-images.githubusercontent.com/11872539/135338439-f0c6c64b-2655-4e9c-905b-699f33069253.png)
   
   
   


-- 
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



[GitHub] [accumulo] ctubbsii commented on a change in pull request #2294: Improve fetching scans and compactions in Monitor

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #2294:
URL: https://github.com/apache/accumulo/pull/2294#discussion_r719637920



##########
File path: server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
##########
@@ -577,63 +556,79 @@ private ServletHolder getRestServlet() {
         oldest = Math.max(oldest, a.age);
       }
       this.oldest = oldest < 0 ? null : oldest;
+      // use clock time for date friendly display
       this.fetched = System.currentTimeMillis();
     }
   }
 
   private final Map<HostAndPort,ScanStats> allScans = new HashMap<>();
   private final Map<HostAndPort,CompactionStats> allCompactions = new HashMap<>();
   private final RecentLogs recentLogs = new RecentLogs();
+  private long scansFetchedNanos = 0L;
+  private long compactsFetchedNanos = 0L;
+  private final long fetchTimeNanos = TimeUnit.NANOSECONDS.convert(1, TimeUnit.MINUTES);
+  private final long ageOffEntriesMillis = TimeUnit.MILLISECONDS.convert(15, TimeUnit.MINUTES);

Review comment:
       Small nit: TimeUnit has a `convert` method, but also has a series of `to<Unit>` methods that are more explicit. The `convert` method can be sometimes confusing, because it's not obvious the direction in which you're doing the converting. In general, I recommend the use of the more explicit `toNanos` and `toMillis`, etc. methods instead of `convert`.




-- 
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