Apache9 commented on a change in pull request #2450:
URL: https://github.com/apache/hbase/pull/2450#discussion_r495437735
##########
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:
Seems you do not get my point...
What I mean is what is the difference when returning null and an empty Map
for the retainAssignment method... I do not care when will the method return
null, I just want to know, is it OK to change to return an empty Map. If not,
why?
----------------------------------------------------------------
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]