You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hbgstc123 (via GitHub)" <gi...@apache.org> on 2023/09/13 06:47:52 UTC
[GitHub] [hudi] hbgstc123 commented on a diff in pull request #9681: [HUDI-6847] improve the incremental clean fallback logic
hbgstc123 commented on code in PR #9681:
URL: https://github.com/apache/hudi/pull/9681#discussion_r1324050429
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/TestCleaner.java:
##########
@@ -1124,15 +1124,16 @@ public void testIncrementalFallbackToFullClean() throws Exception {
put(p1, CollectionUtils.createImmutableList(file1P1, file2P1));
}
});
- commitWithMdt("1", part1ToFileId, testTable, metadataWriter);
- commitWithMdt("2", part1ToFileId, testTable, metadataWriter);
+ commitWithMdt("10", part1ToFileId, testTable, metadataWriter);
+ testTable.addClean("15");
+ commitWithMdt("20", part1ToFileId, testTable, metadataWriter);
// add clean instant
HoodieCleanerPlan cleanerPlan = new HoodieCleanerPlan(new HoodieActionInstant("", "", ""),
"", "", new HashMap<>(), CleanPlanV2MigrationHandler.VERSION, new HashMap<>(), new ArrayList<>());
HoodieCleanMetadata cleanMeta = new HoodieCleanMetadata("", 0L, 0,
- "2", "", new HashMap<>(), CleanPlanV2MigrationHandler.VERSION, new HashMap<>());
- testTable.addClean("3", cleanerPlan, cleanMeta);
+ "20", "", new HashMap<>(), CleanPlanV2MigrationHandler.VERSION, new HashMap<>());
Review Comment:
I add a clean instant between the original instant '1' and '2' to test that fallback logic is not influenced by clean. I could have add 1 to every instant after the clean instant I added, but make every instant 2 digit can leave some naming space between instants, incase someone want to add more instants in between in the future.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org