ndimiduk commented on a change in pull request #2917:
URL: https://github.com/apache/hbase/pull/2917#discussion_r570437845
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
##########
@@ -468,12 +467,13 @@ private static boolean isOldEnoughForMerge(
*/
private boolean isLargeEnoughForMerge(
final NormalizerConfiguration normalizerConfiguration,
+ final NormalizeContext ctx,
final RegionInfo regionInfo
) {
- return getRegionSizeMB(regionInfo) >=
normalizerConfiguration.getMergeMinRegionSizeMb();
+ return getRegionSizeMB(regionInfo) >=
normalizerConfiguration.getMergeMinRegionSizeMb(ctx);
}
- private static boolean logTraceReason(final BooleanSupplier predicate, final
String fmtWhenTrue,
+ private boolean logTraceReason(final BooleanSupplier predicate, final String
fmtWhenTrue,
Review comment:
As a general practice, when a method can be static, I prefer to make it
so. If a method has no need for `this` or private state, why expose it? I find
static methods are easier to reason about because you know there's no hidden
effects of object member variables manipulated elsewhere. I suspect they're
simpler for the JIT to optimize for the same reasons, but I don't have evidence
of this.
----------------------------------------------------------------
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:
[email protected]