bbeaudreault commented on code in PR #4888:
URL: https://github.com/apache/hbase/pull/4888#discussion_r1028517667


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/RegionNormalizerWorker.java:
##########
@@ -207,14 +214,34 @@ private List<NormalizationPlan> calculatePlans(final 
TableName tableName) {
       return Collections.emptyList();
     }
 
-    final List<NormalizationPlan> plans = 
regionNormalizer.computePlansForTable(tblDesc);
+    List<NormalizationPlan> plans = 
regionNormalizer.computePlansForTable(tblDesc);
+
+    plans = truncateForSize(plans);
+
     if (CollectionUtils.isEmpty(plans)) {
       LOG.debug("No normalization required for table {}.", tableName);
       return Collections.emptyList();
     }
     return plans;
   }
 
+  private List<NormalizationPlan> truncateForSize(List<NormalizationPlan> 
plans) {

Review Comment:
   Sorry I think you misunderstood my request. I wouldn't normally push further 
on a logging change, but I think getting the right data will be helpful here.  
   
   We're adding a configurable limit on total bytes processed. If someone is 
ever going to want to tune this, it'll be helpful to know how many total bytes 
are necessary to normalize. Even logging this over time will be useful to have 
a sense for throughput over time. So in addition to the list sizes, I think we 
should include the size we truncated at and the total size calculated by 
`calculatePlans`. That's why I was saying we might need to remove the `break`, 
since it'll require iterating all plans. I think it's still worth it since this 
isn't a super cpu intensive process.



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