Skip to content

Commit d66ed4c

Browse files
committed
HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded (#714)
Signed-off-by: Reid Chan <reidchan@apache.org>
1 parent 214d33e commit d66ed4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,11 @@ static class PrimaryRegionCountSkewCostFunction extends CostFunction {
12431243
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST));
12441244
}
12451245

1246+
@Override
1247+
boolean isNeeded() {
1248+
return cluster.hasRegionReplicas;
1249+
}
1250+
12461251
@Override
12471252
protected double cost() {
12481253
if (!cluster.hasRegionReplicas) {

0 commit comments

Comments
 (0)