HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded (#714)

Signed-off-by: Reid Chan <reidchan@apache.org>
This commit is contained in:
Andrew Purtell 2019-10-12 13:14:13 -07:00 committed by GitHub
parent 065993294f
commit 73d69c6157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -1236,6 +1236,11 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST));
}
@Override
boolean isNeeded() {
return cluster.hasRegionReplicas;
}
@Override
protected double cost() {
if (!cluster.hasRegionReplicas) {