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
parent 7171da09ea
commit 56e0652aff
No known key found for this signature in database
GPG Key ID: 8597754DD5365CCD

View File

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