From ba2632b358942cf246ec8e86dbdb340b651cf085 Mon Sep 17 00:00:00 2001 From: "Wang, Xinglong" Date: Tue, 31 Oct 2017 03:04:34 +0800 Subject: [PATCH] HBASE-18602 rsgroup cleanup unassign code Signed-off-by: Chia-Ping Tsai --- .../hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java index d7f94989d4a..e1bcb25b071 100644 --- a/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java +++ b/hbase-rsgroup/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java @@ -25,7 +25,6 @@ import com.google.common.collect.LinkedListMultimap; import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Maps; - import java.io.IOException; import java.util.ArrayList; import java.util.Collection; @@ -37,10 +36,8 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.ClusterStatus; import org.apache.hadoop.hbase.HBaseIOException; @@ -350,7 +347,6 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc Map> existingAssignments){ Map> correctAssignments = new TreeMap>(); - List misplacedRegions = new LinkedList(); correctAssignments.put(LoadBalancer.BOGUS_SERVER_NAME, new LinkedList()); for (Map.Entry> assignments : existingAssignments.entrySet()){ ServerName sName = assignments.getKey(); @@ -372,12 +368,6 @@ public class RSGroupBasedLoadBalancer implements RSGroupableBalancer, LoadBalanc } } } - - //TODO bulk unassign? - //unassign misplaced regions, so that they are assigned to correct groups. - for(HRegionInfo info: misplacedRegions) { - this.masterServices.getAssignmentManager().unassign(info); - } return correctAssignments; }