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 2020/03/13 02:19:20 UTC

[GitHub] [hbase] nyl3532016 commented on a change in pull request #1279: HBASE-23949 refactor loadBalancer implements for rsgroup balance by t…

nyl3532016 commented on a change in pull request #1279: HBASE-23949 refactor loadBalancer implements for rsgroup balance by t…
URL: https://github.com/apache/hbase/pull/1279#discussion_r391996237
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
 ##########
 @@ -1639,6 +1641,44 @@ private void roundRobinAssignment(Cluster cluster, List<RegionInfo> regions,
     }
   }
 
+  private Map<ServerName, List<RegionInfo>> toEnsumbleTableClusterLoad(
+      Map<TableName, Map<ServerName, List<RegionInfo>>> clusterLoadPerTable) {
+    Map<ServerName, List<RegionInfo>> returnMap = new TreeMap<>();
+    for (Map<ServerName, List<RegionInfo>> serverNameListMap : clusterLoadPerTable.values()) {
+      serverNameListMap.forEach((serverName, regionInfoList) -> {
+        List<RegionInfo> regionInfos =
+            returnMap.computeIfAbsent(serverName, k -> new ArrayList<>());
+        regionInfos.addAll(regionInfoList);
+      });
+    }
+    return returnMap;
+  }
+
+  @Override
+  public List<RegionPlan> balanceTable(TableName tableName, Map<ServerName, List<RegionInfo>> clusterLoad){
+    throw new UnsupportedOperationException("balanceTable is not support in BaseLoadBalancer");
+  }
+
+  @Override
+  public synchronized List<RegionPlan>
 
 Review comment:
   method of the extends class need be synchronized

----------------------------------------------------------------
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