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

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
 ##########
 @@ -18,73 +18,45 @@
  */
 package org.apache.hadoop.hbase.master.normalizer;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HBaseIOException;
-import org.apache.hadoop.hbase.RegionMetrics;
-import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.Size;
 import org.apache.hadoop.hbase.TableName;
-import org.apache.hadoop.hbase.client.MasterSwitchType;
 import org.apache.hadoop.hbase.client.RegionInfo;
-import org.apache.hadoop.hbase.client.TableDescriptor;
-import org.apache.hadoop.hbase.master.MasterRpcServices;
-import org.apache.hadoop.hbase.master.MasterServices;
 import org.apache.hadoop.hbase.master.normalizer.NormalizationPlan.PlanType;
 import org.apache.yetus.audience.InterfaceAudience;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;
-
 /**
- * Simple implementation of region normalizer.
- *
- * 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 RegionMetrics)
- *  <li> Seek every single region one by one. If a region R0 is bigger than S 
* 2, it is
- *  kindly requested to split. Thereon evaluate the next region R1
- *  <li> Otherwise, if R0 + R1 is smaller than S, R0 and R1 are kindly 
requested to merge.
- *  Thereon evaluate the next region R2
- *  <li> Otherwise, R1 is evaluated
+ * Simple implementation of region normalizer. 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 
RegionMetrics)
+ * <li>Seek every single region one by one. If a region R0 is bigger than S * 
2, it is kindly
+ * requested to split. Thereon evaluate the next region R1
+ * <li>Otherwise, if R0 + R1 is smaller than S, R0 and R1 are kindly requested 
to merge. Thereon
+ * evaluate the next region R2
+ * <li>Otherwise, R1 is evaluated
  * </ol>
  * <p>
- * Region sizes are coarse and approximate on the order of megabytes. 
Additionally,
- * "empty" regions (less than 1MB, with the previous note) are not merged 
away. This
- * is by design to prevent normalization from undoing the pre-splitting of a 
table.
+ * Region sizes are coarse and approximate on the order of megabytes. 
Additionally, "empty" regions
+ * (less than 1MB, with the previous note) are not merged away. This is by 
design to prevent
+ * normalization from undoing the pre-splitting of a table.
 
 Review comment:
   Added the comments explaining how it is different

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