HBASE-23954 SplitParent region should not be balanced (#1264)

Co-authored-by: niuyulin <niuyulin@xiaomi.com>

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
niuyulin 2020-03-11 02:14:43 +08:00 committed by GitHub
parent e1e8f396ca
commit 6e6b241e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -559,6 +559,9 @@ public class RegionStates {
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();
@ -581,9 +584,10 @@ public class RegionStates {
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()))
.filter(region -> !region.isSplitParent()).collect(Collectors.toList()));
} else {
ensemble.put(serverName, new ArrayList<>());
}