danny0405 commented on code in PR #8319:
URL: https://github.com/apache/hudi/pull/8319#discussion_r1172037993
##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/deltastreamer/TestHoodieDeltaStreamer.java:
##########
@@ -1088,28 +1088,30 @@ public void
testCleanerDeleteReplacedDataWithArchive(Boolean asyncClean, HoodieR
assertFalse(replacedFilePaths.isEmpty());
- // Step 4 : Insert 1 record and trigger sync/async cleaner and archive.
- List<String> configs = getAsyncServicesConfigs(1, "true", "true", "6", "",
"");
- configs.add(String.format("%s=%s", HoodieCleanConfig.CLEANER_POLICY.key(),
"KEEP_LATEST_COMMITS"));
- configs.add(String.format("%s=%s",
HoodieCleanConfig.CLEANER_COMMITS_RETAINED.key(), "1"));
- configs.add(String.format("%s=%s",
HoodieArchivalConfig.MIN_COMMITS_TO_KEEP.key(), "2"));
- configs.add(String.format("%s=%s",
HoodieArchivalConfig.MAX_COMMITS_TO_KEEP.key(), "3"));
- configs.add(String.format("%s=%s", HoodieCleanConfig.ASYNC_CLEAN.key(),
asyncClean));
- configs.add(String.format("%s=%s",
HoodieMetadataConfig.COMPACT_NUM_DELTA_COMMITS.key(), "1"));
- configs.add(String.format("%s=%s", HoodieWriteConfig.MARKERS_TYPE.key(),
"DIRECT"));
- if (asyncClean) {
- configs.add(String.format("%s=%s",
HoodieWriteConfig.WRITE_CONCURRENCY_MODE.key(),
- WriteConcurrencyMode.OPTIMISTIC_CONCURRENCY_CONTROL.name()));
- configs.add(String.format("%s=%s",
HoodieCleanConfig.FAILED_WRITES_CLEANER_POLICY.key(),
- HoodieFailedWritesCleaningPolicy.LAZY.name()));
- configs.add(String.format("%s=%s",
HoodieLockConfig.LOCK_PROVIDER_CLASS_NAME.key(),
- InProcessLockProvider.class.getName()));
- }
- TestHelpers.addRecordMerger(recordType, configs);
- cfg.configs = configs;
- cfg.continuousMode = false;
- ds = new HoodieDeltaStreamer(cfg, jsc);
- ds.sync();
+ // Step 4 : Add commits with insert of 1 record and trigger sync/async
cleaner and archive.
+ for (int i = 0; i < 2; i++) {
+ List<String> configs = getAsyncServicesConfigs(1, "true", "true", "6",
"", "");
+ configs.add(String.format("%s=%s",
HoodieCleanConfig.CLEANER_POLICY.key(), "KEEP_LATEST_COMMITS"));
+ configs.add(String.format("%s=%s",
HoodieCleanConfig.CLEANER_COMMITS_RETAINED.key(), "1"));
Review Comment:
Guess there is no need to for-loop the write config for 2 times ?
--
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]