Class RegionReplicaHostCostFunction
java.lang.Object
org.apache.hadoop.hbase.master.balancer.CostFunction
org.apache.hadoop.hbase.master.balancer.RegionReplicaGroupingCostFunction
org.apache.hadoop.hbase.master.balancer.RegionReplicaHostCostFunction
A cost function for region replicas. We give a very high cost to hosting replicas of the same
region in the same host. We do not prevent the case though, since if numReplicas >
numRegionServers, we still want to keep the replica open.
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.agrona.collections.Int2IntCounterMap[]
private static final float
private static final String
Fields inherited from class org.apache.hadoop.hbase.master.balancer.RegionReplicaGroupingCostFunction
costsPerGroup, maxCost
Fields inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
cluster, COST_EPSILON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
regionMoved
(int region, int oldServer, int newServer) Methods inherited from class org.apache.hadoop.hbase.master.balancer.RegionReplicaGroupingCostFunction
cost, costPerGroup, getMaxCost, isNeeded, prepare, updateWeight
Methods inherited from class org.apache.hadoop.hbase.master.balancer.CostFunction
getMultiplier, postAction, scale, setMultiplier
-
Field Details
-
REGION_REPLICA_HOST_COST_KEY
- See Also:
-
DEFAULT_REGION_REPLICA_HOST_COST_KEY
- See Also:
-
colocatedReplicaCountsPerGroup
-
-
Constructor Details
-
RegionReplicaHostCostFunction
-
-
Method Details
-
loadCosts
- Specified by:
loadCosts
in classRegionReplicaGroupingCostFunction
-
regionMoved
- Overrides:
regionMoved
in classCostFunction
-