You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by na...@apache.org on 2019/08/01 19:36:02 UTC
[hadoop] branch ozone-0.4.1 updated: HDDS-1882.
TestReplicationManager failed with NPE. (#1197)
This is an automated email from the ASF dual-hosted git repository.
nanda pushed a commit to branch ozone-0.4.1
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/ozone-0.4.1 by this push:
new bb7ce03 HDDS-1882. TestReplicationManager failed with NPE. (#1197)
bb7ce03 is described below
commit bb7ce03cc06c5dffe089027343f0680eb6d0d738
Author: Sammi Chen <sa...@apache.org>
AuthorDate: Fri Aug 2 03:33:57 2019 +0800
HDDS-1882. TestReplicationManager failed with NPE. (#1197)
(cherry picked from commit e111789aeb005c76e443c96418cd9fddf9bdb8a2)
---
.../org/apache/hadoop/hdds/scm/container/ReplicationManager.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
index 0557ea1..a8dff40 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
@@ -486,8 +486,11 @@ public class ReplicationManager {
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());
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org