You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ayushtkn (via GitHub)" <gi...@apache.org> on 2023/04/19 23:11:31 UTC

[GitHub] [hadoop] ayushtkn commented on a diff in pull request #5483: HDFS-16954. RBF: rename a dir that has multiple destinations to a dir that just…

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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org