GuoPhilipse commented on a change in pull request #3696:
URL: https://github.com/apache/hadoop/pull/3696#discussion_r762809175
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestBlockStoragePolicy.java
##########
@@ -1274,23 +1274,29 @@ public void testChooseTargetWithTopology() throws
Exception {
DFSTestUtil.formatNameNode(conf);
NameNode namenode = new NameNode(conf);
- final BlockManager bm = namenode.getNamesystem().getBlockManager();
- BlockPlacementPolicy replicator = bm.getBlockPlacementPolicy();
- NetworkTopology cluster = bm.getDatanodeManager().getNetworkTopology();
- for (DatanodeDescriptor datanode : dataNodes) {
- cluster.add(datanode);
- }
-
- DatanodeStorageInfo[] targets = replicator.chooseTarget("/foo", 3,
- dataNodes[0], Collections.<DatanodeStorageInfo>emptyList(), false,
- new HashSet<Node>(), 0, policy1, null);
- System.out.println(Arrays.asList(targets));
- Assert.assertEquals(3, targets.length);
- targets = replicator.chooseTarget("/foo", 3,
- dataNodes[0], Collections.<DatanodeStorageInfo>emptyList(), false,
- new HashSet<Node>(), 0, policy2, null);
- System.out.println(Arrays.asList(targets));
- Assert.assertEquals(3, targets.length);
+ try{
Review comment:
>
Thanks @ayushtkn , will update it later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]