virajjasani commented on a change in pull request #1788:
URL: https://github.com/apache/hbase/pull/1788#discussion_r431626003



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
##########
@@ -148,14 +156,17 @@ public int compare(NormalizationPlan plan1, 
NormalizationPlan plan2) {
     List<RegionInfo> tableRegions = 
masterServices.getAssignmentManager().getRegionStates().
       getRegionsOfTable(table);
 
-    //TODO: should we make min number of regions a config param?
-    if (tableRegions == null || tableRegions.size() < MIN_REGION_COUNT) {
-      int nrRegions = tableRegions == null ? 0 : tableRegions.size();
-      LOG.debug("Table " + table + " has " + nrRegions + " regions, required 
min number"
-        + " of regions for normalizer to run is " + MIN_REGION_COUNT + ", not 
running normalizer");
+    if (tableRegions == null) {
       return null;
     }
 
+    if (tableRegions.size() < minRegionCount) {
+      LOG.debug("Table " + table + " has " + tableRegions.size() + " regions, 
required min number"
+          + " of regions for normalizer merging to run is " + minRegionCount
+          + ", not running normalizer merging");

Review comment:
       Good to use parameters with `{}` for variables.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to