Class StoreFileTableSkewCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.CostFromRegionLoadFunction
org.apache.hadoop.hbase.master.balancer.StoreFileTableSkewCostFunction
Lightweight cost function that mirrors TableSkewCostFunction but aggregates storefile sizes (in
 MB) per table using the CostFromRegionLoadFunction framework. For each table, it computes a
 per-server aggregated storefile size by summing the average storefile size for each region (if
 there are multiple load metrics, it averages them). The imbalance cost (as computed by
 DoubleArrayCost) is then used to drive the balancer to reduce differences between servers.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate DoubleArrayCost[]private static final floatprivate static final StringFields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunctioncluster
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected doublecost()protected doublevoidprepare(BalancerClusterState cluster) Called once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.protected voidregionMoved(int region, int oldServer, int newServer) private voidupdateStoreFilePerServerPerTableCosts(int newServer, int tableIdx, double[] costs) Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFromRegionLoadFunctiongetRegionLoadCostMethods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunctiongetCostEpsilon, getMultiplier, isNeeded, postAction, scale, setMultiplier, updateWeight
- 
Field Details- 
STOREFILE_TABLE_SKEW_COST_KEY- See Also:
 
- 
DEFAULT_STOREFILE_TABLE_SKEW_COST- See Also:
 
- 
costsPerTable
 
- 
- 
Constructor Details- 
StoreFileTableSkewCostFunction
 
- 
- 
Method Details- 
prepareDescription copied from class:CostFunctionCalled once per LB invocation to give the cost function to initialize it's state, and perform any costly calculation.- Overrides:
- preparein class- CostFromRegionLoadFunction
 
- 
regionMoved- Overrides:
- regionMovedin class- CostFromRegionLoadFunction
 
- 
updateStoreFilePerServerPerTableCosts
- 
cost- Overrides:
- costin class- CostFromRegionLoadFunction
 
- 
getCostFromRl- Specified by:
- getCostFromRlin class- CostFromRegionLoadFunction
 
 
-