jinhyukify commented on code in PR #7076:
URL: https://github.com/apache/hbase/pull/7076#discussion_r2139126038


##########
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java:
##########
@@ -1040,10 +1040,21 @@ public enum OperationStatusCode {
   public static final String HFILE_PREAD_ALL_BYTES_ENABLED_KEY = 
"hfile.pread.all.bytes.enabled";
   public static final boolean HFILE_PREAD_ALL_BYTES_ENABLED_DEFAULT = false;
 
-  /*
-   * Minimum percentage of free heap necessary for a successful cluster 
startup.
+  /**
+   * Configuration key for the minimum fraction of heap memory that must 
remain free for a
+   * RegionServer to start
+   */
+  public static final String HBASE_REGION_SERVER_FREE_HEAP_MIN_SIZE_KEY =
+    "hbase.regionserver.free.heap.min.size";
+
+  public static final float HBASE_REGION_SERVER_FREE_HEAP_MIN_SIZE_DEFAULT = 
0.1f;
+
+  /**
+   * Configuration key for the absolute amount of heap memory that must remain 
free for a
+   * RegionServer to start
    */
-  public static final float HBASE_CLUSTER_MINIMUM_MEMORY_THRESHOLD = 0.2f;
+  public static final String HBASE_REGION_SERVER_FREE_HEAP_MEMORY_MIN_SIZE_KEY 
=
+    "hbase.regionserver.free.heap.memory.min.size";

Review Comment:
   I agreed with your suggestion and updated the code accordingly.
   Now the configuration uses an absolute amount for setting the free heap 
instead of the previous fraction-based approach.
   If no configuration is provided, it falls back to the default value of 0.2.
   
   The commit is 
https://github.com/apache/hbase/pull/7076/commits/3d2b641ef55012997554be85acd2bb9140d7eb73
   
   Not sure what others will think, but feel free to take a look and share your 
thoughts.
   Thanks again for your helpful input!
   



##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHeapMemoryManager.java:
##########
@@ -72,6 +72,7 @@ public void 
testAutoTunerShouldBeOffWhenMaxMinRangesForMemstoreIsNotGiven() thro
     conf.setFloat(MemorySizeUtil.MEMSTORE_SIZE_KEY, 0.02f);
     conf.setFloat(HeapMemoryManager.BLOCK_CACHE_SIZE_MAX_RANGE_KEY, 0.75f);
     conf.setFloat(HeapMemoryManager.BLOCK_CACHE_SIZE_MIN_RANGE_KEY, 0.03f);
+    conf.setFloat(HConstants.HBASE_REGION_SERVER_FREE_HEAP_MIN_SIZE_KEY, 0.2f);

Review Comment:
   I've updated this part as well. Thanks!



-- 
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: issues-unsubscr...@hbase.apache.org

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

Reply via email to