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 2020/07/07 15:26:38 UTC

[GitHub] [accumulo] Manno15 commented on a change in pull request #1650: Batching Strategy for SimpleGarbageCollector Fix #1543

Manno15 commented on a change in pull request #1650:
URL: https://github.com/apache/accumulo/pull/1650#discussion_r450951378



##########
File path: server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
##########
@@ -669,14 +665,13 @@ private HostAndPort startStatsService() {
   /**
    * Checks if the system is almost out of memory.
    *
-   * @param runtime
-   *          Java runtime
+   * @param candidateLength
+   *          Candidate Length
    * @return true if system is almost out of memory
-   * @see #CANDIDATE_MEMORY_PERCENTAGE
+   * @see #CANDIDATE_BATCH_SIZE
    */
-  static boolean almostOutOfMemory(Runtime runtime) {
-    return runtime.totalMemory() - runtime.freeMemory()
-        > CANDIDATE_MEMORY_PERCENTAGE * runtime.maxMemory();
+  static boolean almostOutOfMemory(Long candidateLength) {

Review comment:
       That's fair, I wasn't quite sure on that either. Do you have any suggestions? 




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

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