HDFS-14853. Addendum: NPE in DFSNetworkTopology#chooseRandomWithStorageType() when the excludedNode is not present. Contributed by Ranith Sardar.

This commit is contained in:
Ayush Saxena 2019-09-28 09:14:50 +05:30
parent 40becd37d0
commit 66e60942e9

View File

@ -378,7 +378,8 @@ public void testChooseRandomWithStorageTypeWithExcludedforNullCheck()
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);