This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 66e6094  HDFS-14853. Addendum: NPE in 
DFSNetworkTopology#chooseRandomWithStorageType() when the excludedNode is not 
present. Contributed by Ranith Sardar.
66e6094 is described below

commit 66e60942e9e20520e2696c4b9439518235eb2b3a
Author: Ayush Saxena <[email protected]>
AuthorDate: Sat Sep 28 09:14:50 2019 +0530

    HDFS-14853. Addendum: NPE in 
DFSNetworkTopology#chooseRandomWithStorageType() when the excludedNode is not 
present. Contributed by Ranith Sardar.
---
 .../test/java/org/apache/hadoop/hdfs/net/TestDFSNetworkTopology.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/net/TestDFSNetworkTopology.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/net/TestDFSNetworkTopology.java
index fdb41a2..d987f85 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/net/TestDFSNetworkTopology.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/net/TestDFSNetworkTopology.java
@@ -378,7 +378,8 @@ public class TestDFSNetworkTopology {
     HashSet<Node> excluded = new HashSet<>();
 
     excluded.add(new DatanodeInfoBuilder()
-        .setNodeID(DatanodeID.EMPTY_DATANODE_ID).build());
+        .setNodeID(new DatanodeID("null",
+            "null", "null", 0, 0, 0, 0)).build());
     Node node = CLUSTER.chooseRandomWithStorageType("/", "/l1/d1/r1", excluded,
         StorageType.ARCHIVE);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to