You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2021/05/29 03:15:39 UTC

[hbase] branch branch-2.3 updated: HBASE-25938 The SnapshotOfRegionAssignmentFromMeta.initialize call in FavoredNodeLoadBalancer is just a dummy one (#3329)

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

zhangduo pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 0620f08  HBASE-25938 The SnapshotOfRegionAssignmentFromMeta.initialize call in FavoredNodeLoadBalancer is just a dummy one (#3329)
0620f08 is described below

commit 0620f08bdf4a28ff8e80db31d1e655b8abca7fbb
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Sat May 29 11:04:41 2021 +0800

    HBASE-25938 The SnapshotOfRegionAssignmentFromMeta.initialize call in FavoredNodeLoadBalancer is just a dummy one (#3329)
    
    Signed-off-by: Yulin Niu <ni...@apache.org>
---
 .../apache/hadoop/hbase/favored/FavoredNodeLoadBalancer.java | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeLoadBalancer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeLoadBalancer.java
index 5845f2c..fc311e5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeLoadBalancer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/favored/FavoredNodeLoadBalancer.java
@@ -40,7 +40,6 @@ import org.apache.hadoop.hbase.favored.FavoredNodesPlan.Position;
 import org.apache.hadoop.hbase.master.RackManager;
 import org.apache.hadoop.hbase.master.RegionPlan;
 import org.apache.hadoop.hbase.master.ServerManager;
-import org.apache.hadoop.hbase.master.SnapshotOfRegionAssignmentFromMeta;
 import org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer;
 import org.apache.hadoop.hbase.util.Pair;
 import org.apache.yetus.audience.InterfaceAudience;
@@ -92,17 +91,6 @@ public class FavoredNodeLoadBalancer extends BaseLoadBalancer implements Favored
       Map<ServerName, List<RegionInfo>> loadOfOneTable) {
     // TODO. Look at is whether Stochastic loadbalancer can be integrated with this
     List<RegionPlan> plans = new ArrayList<>();
-    // perform a scan of the meta to get the latest updates (if any)
-    SnapshotOfRegionAssignmentFromMeta snaphotOfRegionAssignment =
-        new SnapshotOfRegionAssignmentFromMeta(super.services.getConnection());
-    try {
-      snaphotOfRegionAssignment.initialize();
-    } catch (IOException ie) {
-      LOG.warn("Not running balancer since exception was thrown " + ie);
-      return plans;
-    }
-    // This is not used? Findbugs says so: Map<ServerName, ServerName>
-    // serverNameToServerNameWithoutCode = new HashMap<>();
     Map<ServerName, ServerName> serverNameWithoutCodeToServerName = new HashMap<>();
     ServerManager serverMgr = super.services.getServerManager();
     for (ServerName sn : serverMgr.getOnlineServersList()) {