nyl3532016 commented on a change in pull request #2450:
URL: https://github.com/apache/hbase/pull/2450#discussion_r494242155



##########
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:
       @cuibo01 do you meet this NPE in production environment?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to