Apache9 commented on a change in pull request #2450:
URL: https://github.com/apache/hbase/pull/2450#discussion_r494004814
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupBasedLoadBalancer.java
##########
@@ -203,8 +203,11 @@ public void setMasterServices(MasterServices
masterServices) {
regionList.forEach(r -> currentAssignmentMap.put(r, regions.get(r)));
Map<ServerName, List<RegionInfo>> pairResult =
this.internalBalancer.retainAssignment(currentAssignmentMap,
pair.getSecond());
- pairResult.forEach((server, rs) ->
- assignments.computeIfAbsent(server, s ->
Lists.newArrayList()).addAll(rs));
+ if (pairResult == null || pairResult.isEmpty()) {
Review comment:
When will retainAssignment return null? If there is no difference
between a null and an empty Map, let's just return an empty Map to avoid the
null check here?
----------------------------------------------------------------
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]