HDDS-1882. TestReplicationManager failed with NPE. (#1197)
This commit is contained in:
parent
a7371a779c
commit
e111789aeb
|
@ -486,8 +486,11 @@ public class ReplicationManager {
|
||||||
final List<DatanodeDetails> excludeList = replicas.stream()
|
final List<DatanodeDetails> excludeList = replicas.stream()
|
||||||
.map(ContainerReplica::getDatanodeDetails)
|
.map(ContainerReplica::getDatanodeDetails)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
inflightReplication.get(id).stream().map(r -> r.datanode)
|
List<InflightAction> actionList = inflightReplication.get(id);
|
||||||
.forEach(excludeList::add);
|
if (actionList != null) {
|
||||||
|
actionList.stream().map(r -> r.datanode)
|
||||||
|
.forEach(excludeList::add);
|
||||||
|
}
|
||||||
final List<DatanodeDetails> selectedDatanodes = containerPlacement
|
final List<DatanodeDetails> selectedDatanodes = containerPlacement
|
||||||
.chooseDatanodes(excludeList, null, delta,
|
.chooseDatanodes(excludeList, null, delta,
|
||||||
container.getUsedBytes());
|
container.getUsedBytes());
|
||||||
|
|
Loading…
Reference in New Issue