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


##########
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 realize I didn't provide enough context earlier, sorry about that.
   
   The naming of this configuration follows the convention used by the existing 
block cache size configurations. There are currently two settings that 
determine the size of the block cache: 
([HBASE-28600](https://issues.apache.org/jira/browse/HBASE-28600))
   - `hfile.block.cache.size`
   - `hfile.block.cache.memory.size`
   
   While users are generally familiar with the fraction-based approach, I 
thought it would be helpful to introduce an alternative that accepts 
human-readable memory sizes (e.g., 512m, 4g). So both options are now available.
   
   At least for memory-related configurations, such as free heap, memstore, and 
block cache, I believe supporting both styles (fraction and absolute size) 
makes sense for the near future. Would love to hear your thoughts!
   
   (For now, this dual option is only available for block cache, but I’m 
planning to extend it to memstore configuration soon as well.)



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