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:
parent
e1e8f396ca
commit
6e6b241e2b
|
@ -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<>());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue