You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/10/12 00:57:19 UTC
[GitHub] [hbase] smerkerg commented on a change in pull request #714:
HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should
implement CostFunction#isNeeded
smerkerg commented on a change in pull request #714: HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded
URL: https://github.com/apache/hbase/pull/714#discussion_r334212397
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -1236,11 +1236,13 @@ protected double cost() {
DEFAULT_PRIMARY_REGION_COUNT_SKEW_COST));
}
+ @Override
+ boolean isNeeded() {
+ return cluster.hasRegionReplicas;
+ }
+
@Override
protected double cost() {
- if (!cluster.hasRegionReplicas) {
Review comment:
We should leave these lines here. `isNeeded` is only called by the `needsBalance` call site. But `cost` will still be called when a balance is determined to be needed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services