Skip to content

Commit

Permalink
HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should im…
Browse files Browse the repository at this point in the history
…plement CostFunction#isNeeded (#714)

Signed-off-by: Reid Chan <[email protected]>
  • Loading branch information
apurtell committed Oct 12, 2019
1 parent 214d33e commit d66ed4c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,11 @@ static class PrimaryRegionCountSkewCostFunction extends CostFunction {
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST));
}

@Override
boolean isNeeded() {
return cluster.hasRegionReplicas;
}

@Override
protected double cost() {
if (!cluster.hasRegionReplicas) {
Expand Down

0 comments on commit d66ed4c

Please sign in to comment.