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

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/normalizer/SimpleRegionNormalizer.java
 ##########
 @@ -22,61 +22,36 @@
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.classification.InterfaceAudience;
 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.MasterSwitchType;
-import org.apache.hadoop.hbase.master.MasterRpcServices;
-import org.apache.hadoop.hbase.master.MasterServices;
-import org.apache.hadoop.hbase.protobuf.RequestConverter;
-
-import com.google.protobuf.ServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
- * 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 RegionLoad)
- *  <li> If biggest region is bigger than S * 2, it is kindly requested to 
split,
- *    and normalization stops
- *  <li> Otherwise, two smallest region R1 and its smallest neighbor R2 are 
kindly requested
- *    to merge, if R1 + R1 &lt;  S, and normalization stops
- *  <li> Otherwise, no action is performed
+ * 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 
RegionLoad)
+ * <li>If biggest region is bigger than S * 2, it is kindly requested to 
split, and normalization
+ * stops
+ * <li>Otherwise, two smallest region R1 and its smallest neighbor R2 are 
kindly requested to merge,
+ * if R1 + R1 &lt; S, and normalization stops
+ * <li>Otherwise, no action is performed
  * </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.
  */
 @InterfaceAudience.Private
-public class SimpleRegionNormalizer implements RegionNormalizer {
-
-  private static final Log LOG = 
LogFactory.getLog(SimpleRegionNormalizer.class);
+public class SimpleRegionNormalizer extends BaseNormalizer {
+  private static final Logger LOG = 
LoggerFactory.getLogger(SimpleRegionNormalizer.class);
   private static final int MIN_REGION_COUNT = 3;
 
 Review comment:
   I am not sure about this yet. Let me think a bit. The point is that both 
normalizer can have different requirement for the  MIN_REGION_COUNT. But then 
we can't have both normalizer enabled together. 

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