You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2019/10/12 20:14:23 UTC

[hbase] branch master updated: HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded (#714)

This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 73d69c6  HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded (#714)
73d69c6 is described below

commit 73d69c6157515c28479fc78f224c8065d0c00abc
Author: Andrew Purtell <ap...@apache.org>
AuthorDate: Sat Oct 12 13:14:13 2019 -0700

    HBASE-23153 PrimaryRegionCountSkewCostFunction SLB function should implement CostFunction#isNeeded (#714)
    
    Signed-off-by: Reid Chan <re...@apache.org>
---
 .../apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
index 19fc8fa..269d142 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
@@ -1237,6 +1237,11 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
     }
 
     @Override
+    boolean isNeeded() {
+      return cluster.hasRegionReplicas;
+    }
+
+    @Override
     protected double cost() {
       if (!cluster.hasRegionReplicas) {
         return 0;