Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
terence-yoo committed Aug 21, 2017
1 parent 6a62948 commit d5886b6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ private static List<RegionPlan> makeStochasticPlan(

Map<HRegionInfo, ServerName> regionAssignmentMap = Balance.getRegionAssignmentMap(admin, tableNameSet);
for (Map.Entry<HRegionInfo, ServerName> entry : regionAssignmentMap.entrySet()) {
clusterState.get(entry.getValue()).add(entry.getKey());
List<HRegionInfo> hRegionInfos = clusterState.get(entry.getValue());
if (hRegionInfos != null) {
hRegionInfos.add(entry.getKey());
}
}

Configuration conf = admin.getConfiguration();
Expand Down

0 comments on commit d5886b6

Please sign in to comment.