ayushtkn commented on code in PR #5483:
URL: https://github.com/apache/hadoop/pull/5483#discussion_r1171932550
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRPCMultipleDestinationMountTableResolver.java:
##########
@@ -720,6 +720,48 @@ public void testWriteWithUnavailableSubCluster() throws
IOException {
}
}
+ /**
+ * Test rename a dir from src dir (mapped to both ns0 and ns1) to ns0.
+ */
+ @Test
+ public void testRenameWithMultiDestinations() throws Exception {
+ //create a mount point with multiple destinations
+ String srcDir = "/mount-source-dir";
+ Path path = new Path(srcDir);
+ Map<String, String> destMap = new HashMap<>();
+ destMap.put("ns0", srcDir);
+ destMap.put("ns1", srcDir);
+ nnFs0.mkdirs(path);
+ nnFs1.mkdirs(path);
+ MountTable addEntry =
+ MountTable.newInstance(srcDir, destMap);
+ addEntry.setDestOrder(DestinationOrder.RANDOM);
+ addEntry.setFaultTolerant(true);
Review Comment:
fault tolerant wasn't required as such IMO, but ok no harm
--
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]