infraio commented on a change in pull request #1264: HBASE-23954 SplitParent
region should not be balanced
URL: https://github.com/apache/hbase/pull/1264#discussion_r390221171
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStates.java
##########
@@ -581,9 +584,11 @@ public ServerName getRegionServerOfRegion(RegionInfo
regionInfo) {
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())
Review comment:
filter twice is easy to read?
.filter(region -> !isTableDisabled(tableStateManager,
region.getTable()).filter(region -> !region.isSplitParent())
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services