sadanand48 commented on code in PR #5885:
URL: https://github.com/apache/hadoop/pull/5885#discussion_r1274430970
##########
hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/TestCopyListing.java:
##########
@@ -167,6 +169,77 @@ public void testDuplicates() {
}
}
+ @Test(expected = DuplicateFileException.class, timeout = 10000)
+ public void testDiffBasedSimpleCopyListing() throws IOException {
+ FileSystem fs = null;
+ Configuration configuration = getConf();
+ DistCpSync distCpSync = Mockito.mock(DistCpSync.class);
+ Path listingFile = new Path("/tmp/list");
+ // Throws DuplicateFileException when copyListing is SimpleCopyListing
+ // as it recursively traverses src3 directory and also adds 3.txt,4.txt
twice
+ configuration.set(DistCpConstants.CONF_LABEL_DIFF_COPY_LISTING_CLASS,
+ SimpleCopyListing.class.getName());
Review Comment:
HDFS to Ozone -> traverseDirectory - true as hdfs diff contains only top
level dirs
Ozone to HDFS -> traverseDirectory - false as ozone diff contains all
subpaths too
--
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]