wchevreuil commented on a change in pull request #931: HBASE-22285 A normalizer 
which merges small size regions with adjacen…
URL: https://github.com/apache/hbase/pull/931#discussion_r358169555
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/MergeNormalizer.java
 ##########
 @@ -0,0 +1,154 @@
+package org.apache.hadoop.hbase.master.normalizer;
+
+import com.google.protobuf.ServiceException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.hbase.HBaseIOException;
+import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.RegionLoad;
+import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.TableName;
+import org.apache.hadoop.hbase.classification.InterfaceAudience;
+import org.apache.hadoop.hbase.client.Admin;
+import org.apache.hadoop.hbase.master.MasterRpcServices;
+import org.apache.hadoop.hbase.master.MasterServices;
+import org.apache.hadoop.hbase.protobuf.RequestConverter;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+
+
+/**
+ * Implementation of MergeNormalizer
+ *
+ * Logic in use:
+ *
+ *  <ol>
+ *  <li> get all regions of a given table
+ *  <li> get avg size S of each region (by total size of store files reported 
in RegionLoad)
+ *  <li> Otherwise, two region R1 and its smallest neighbor R2 are merged,
 
 Review comment:
   Some nits:
   1) Remove _Otherwise_ from the beginning;
   2) _two regions_, not _two region_;
   3) _neighbour_, not _neighbor_;
   
   I also believe this sentence is not really true. My readings from the code 
is that it picks the first neighbour that meets the condition, not actually the 
smallest one. Could you confirm if my understanding is right? If so, could you 
explain that in the comment?

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


With regards,
Apache Git Services

Reply via email to