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:21:18 -07:00
parent 214d33e0f4
commit d66ed4c32e
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD

View File

@ -1243,6 +1243,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) {