@InterfaceAudience.Private public class SimpleRegionNormalizer extends Object implements RegionNormalizer
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.
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private MasterServices |
masterServices |
private static int |
MIN_REGION_COUNT |
private Comparator<NormalizationPlan> |
planComparator |
Constructor and Description |
---|
SimpleRegionNormalizer() |
Modifier and Type | Method and Description |
---|---|
List<NormalizationPlan> |
computePlanForTable(TableName table)
Computes next most "urgent" normalization action on the table.
|
private long |
getRegionSize(HRegionInfo hri) |
void |
setMasterServices(MasterServices masterServices)
Set the master service.
|
private static final org.apache.commons.logging.Log LOG
private static final int MIN_REGION_COUNT
private MasterServices masterServices
private Comparator<NormalizationPlan> planComparator
public void setMasterServices(MasterServices masterServices)
setMasterServices
in interface RegionNormalizer
masterServices
- inject instance of MasterServicespublic List<NormalizationPlan> computePlanForTable(TableName table) throws HBaseIOException
computePlanForTable
in interface RegionNormalizer
table
- table to normalizeHBaseIOException
private long getRegionSize(HRegionInfo hri)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.