bvaradar commented on a change in pull request #1062: [HUDI-294] Delete Paths
written in Cleaner plan needs to be relative to partition-path
URL: https://github.com/apache/incubator-hudi/pull/1062#discussion_r352762652
##########
File path: hudi-client/src/test/java/org/apache/hudi/TestCleaner.java
##########
@@ -597,6 +600,103 @@ public void testKeepLatestFileVersionsMOR() throws
IOException {
file2P0L0, Option.of(2)));
}
+ @Test
+ public void testUpgradeDowngrade() {
+ String commitTime = "000";
+
+ String partition1 = DEFAULT_PARTITION_PATHS[0];
+ String partition2 = DEFAULT_PARTITION_PATHS[1];
+
+ String fileName1 = "data1_1_000.parquet";
+ String fileName2 = "data2_1_000.parquet";
+
+ String filePath1 = metaClient.getBasePath() + "/" + partition1 + "/" +
fileName1;
+ String filePath2 = metaClient.getBasePath() + "/" + partition1 + "/" +
fileName2;
+
+ List<String> deletePathPatterns1 = Arrays.asList(filePath1, filePath2);
+ List<String> successDeleteFiles1 = Arrays.asList(filePath1);
+ List<String> failedDeleteFiles1 = Arrays.asList(filePath2);
+
+ // create partition1 clean stat.
+ HoodieCleanStat cleanStat1 = new
HoodieCleanStat(HoodieCleaningPolicy.KEEP_LATEST_FILE_VERSIONS,
+ partition1, deletePathPatterns1, successDeleteFiles1,
+ failedDeleteFiles1, commitTime);
+
+ List<String> deletePathPatterns2 = new ArrayList<>();
+ List<String> successDeleteFiles2 = new ArrayList<>();
+ List<String> failedDeleteFiles2 = new ArrayList<>();
+
+ // create partition2 empty clean stat.
+ HoodieCleanStat cleanStat2 = new
HoodieCleanStat(HoodieCleaningPolicy.KEEP_LATEST_COMMITS,
+ partition2, deletePathPatterns2, successDeleteFiles2,
+ failedDeleteFiles2, commitTime);
+
+ // map with absolutely file path.
Review comment:
nit: absolutely -> absolute
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services