junegunn commented on code in PR #6709:
URL: https://github.com/apache/hbase/pull/6709#discussion_r1961150170
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java:
##########
@@ -427,15 +430,16 @@ public enum OperationStatusCode {
* update traffic.
*/
public static final String HREGION_MEMSTORE_BLOCK_MULTIPLIER =
- "hbase.hregion.memstore.block.multiplier";
+ ConfigKey.INT("hbase.hregion.memstore.block.multiplier", v -> v > 0);
/**
* Default value for hbase.hregion.memstore.block.multiplier
*/
public static final int DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER = 4;
/** Conf key for the memstore size at which we flush the memstore */
- public static final String HREGION_MEMSTORE_FLUSH_SIZE =
"hbase.hregion.memstore.flush.size";
+ public static final String HREGION_MEMSTORE_FLUSH_SIZE =
+ ConfigKey.LONG("hbase.hregion.memstore.flush.size", v -> v > 0);
Review Comment:
It it clear that it doesn't make sense to use a non-positive value here,
because that would block any writes. i.e. `Region is too busy due to exceeding
memstore size limit`. So I added the predicate here.
##########
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java:
##########
@@ -427,15 +430,16 @@ public enum OperationStatusCode {
* update traffic.
*/
public static final String HREGION_MEMSTORE_BLOCK_MULTIPLIER =
- "hbase.hregion.memstore.block.multiplier";
+ ConfigKey.INT("hbase.hregion.memstore.block.multiplier", v -> v > 0);
/**
* Default value for hbase.hregion.memstore.block.multiplier
*/
public static final int DEFAULT_HREGION_MEMSTORE_BLOCK_MULTIPLIER = 4;
/** Conf key for the memstore size at which we flush the memstore */
- public static final String HREGION_MEMSTORE_FLUSH_SIZE =
"hbase.hregion.memstore.flush.size";
+ public static final String HREGION_MEMSTORE_FLUSH_SIZE =
+ ConfigKey.LONG("hbase.hregion.memstore.flush.size", v -> v > 0);
Review Comment:
It is clear that it doesn't make sense to use a non-positive value here,
because that would block any writes. i.e. `Region is too busy due to exceeding
memstore size limit`. So I added the predicate here.
--
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]