@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.slf4j.Logger |
LOG |
private MasterRpcServices |
masterRpcServices |
private MasterServices |
masterServices |
private static int |
MIN_REGION_COUNT |
private Comparator<NormalizationPlan> |
planComparator |
private static long[] |
skippedCount |
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(RegionInfo hri) |
long |
getSkippedCount(NormalizationPlan.PlanType type) |
void |
planSkipped(RegionInfo hri,
NormalizationPlan.PlanType type)
Notification for the case where plan couldn't be executed due to constraint violation, such as
namespace quota
|
void |
setMasterRpcServices(MasterRpcServices masterRpcServices)
Set the master RPC service.
|
void |
setMasterServices(MasterServices masterServices)
Set the master service.
|
private static final org.slf4j.Logger LOG
private static final int MIN_REGION_COUNT
private MasterServices masterServices
private MasterRpcServices masterRpcServices
private static long[] skippedCount
private Comparator<NormalizationPlan> planComparator
public SimpleRegionNormalizer()
public void setMasterServices(MasterServices masterServices)
setMasterServices
in interface RegionNormalizer
masterServices
- inject instance of MasterServicespublic void setMasterRpcServices(MasterRpcServices masterRpcServices)
RegionNormalizer
RegionNormalizer.computePlanForTable(TableName)
.setMasterRpcServices
in interface RegionNormalizer
masterRpcServices
- master RPC services to usepublic void planSkipped(RegionInfo hri, NormalizationPlan.PlanType type)
RegionNormalizer
planSkipped
in interface RegionNormalizer
hri
- the region which is involved in the plantype
- type of planpublic long getSkippedCount(NormalizationPlan.PlanType type)
getSkippedCount
in interface RegionNormalizer
type
- type of plan for which skipped count is to be returnedpublic List<NormalizationPlan> computePlanForTable(TableName table) throws HBaseIOException
computePlanForTable
in interface RegionNormalizer
table
- table to normalizeHBaseIOException
private long getRegionSize(RegionInfo hri)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.