Skip to content

Commit

Permalink
HDDS-1882. TestReplicationManager failed with NPE. (apache#1197)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenSammi authored and ahussein committed Oct 29, 2019
1 parent c37b17a commit cdcdb53
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,11 @@ private void handleUnderReplicatedContainer(final ContainerInfo container,
final List<DatanodeDetails> excludeList = replicas.stream()
.map(ContainerReplica::getDatanodeDetails)
.collect(Collectors.toList());
inflightReplication.get(id).stream().map(r -> r.datanode)
.forEach(excludeList::add);
List<InflightAction> actionList = inflightReplication.get(id);
if (actionList != null) {
actionList.stream().map(r -> r.datanode)
.forEach(excludeList::add);
}
final List<DatanodeDetails> selectedDatanodes = containerPlacement
.chooseDatanodes(excludeList, null, delta,
container.getUsedBytes());
Expand Down

0 comments on commit cdcdb53

Please sign in to comment.