Skip to content

Commit

Permalink
HBASE-23954 SplitParent region should not be balanced
Browse files Browse the repository at this point in the history
  • Loading branch information
niuyulin committed Mar 10, 2020
1 parent 819965a commit 4d6b4a0
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -559,6 +559,9 @@ public Map<TableName, Map<ServerName, List<RegionInfo>>> getAssignmentsForBalanc
if (isTableDisabled(tableStateManager, node.getTable())) {
continue;
}
if (node.getRegionInfo().isSplitParent()) {
continue;
}
Map<ServerName, List<RegionInfo>> tableResult =
result.computeIfAbsent(node.getTable(), t -> new HashMap<>());
final ServerName serverName = node.getRegionLocation();
Expand All @@ -581,9 +584,11 @@ public Map<TableName, Map<ServerName, List<RegionInfo>>> getAssignmentsForBalanc
for (ServerName serverName : onlineServers) {
ServerStateNode serverNode = serverMap.get(serverName);
if (serverNode != null) {
ensemble.put(serverNode.getServerName(), serverNode.getRegionInfoList().stream()
.filter(region -> !isTableDisabled(tableStateManager, region.getTable()))
.collect(Collectors.toList()));
ensemble.put(serverNode.getServerName(),
serverNode.getRegionInfoList().stream()
.filter(region -> !isTableDisabled(tableStateManager, region.getTable())
&& !region.isSplitParent())
.collect(Collectors.toList()));
} else {
ensemble.put(serverName, new ArrayList<>());
}
Expand Down

0 comments on commit 4d6b4a0

Please sign in to comment.