zhedoubushishi commented on a change in pull request #1870:
URL: https://github.com/apache/hudi/pull/1870#discussion_r467496945
##########
File path:
hudi-client/src/main/java/org/apache/hudi/table/action/clean/CleanActionExecutor.java
##########
@@ -116,6 +119,19 @@ HoodieCleanerPlan requestClean(JavaSparkContext jsc) {
PartitionCleanStat partitionCleanStat =
partitionCleanStatMap.get(partitionPath);
partitionCleanStat.addDeleteFilePatterns(deletePath.getName());
partitionCleanStat.addDeletedFileResult(deletePath.getName(),
deletedFileResult);
+
+ // If CleanBootstrapSourceFileEnabled and it is a metadata bootstrap
commit, also delete the corresponding source file
+ if (cleanBootstrapSourceFileEnabled && !FSUtils.isLogFile(deletePath)
+ &&
FSUtils.getCommitTime(delFileName).equals(HoodieTimeline.METADATA_BOOTSTRAP_INSTANT_TS))
{
+ Option<HoodieBaseFile> baseFile =
fileSystemView.getBaseFileOn(partitionPath,
Review comment:
I see what you mean. Yea we should avoid making unnecessary calls. So
regarding to versioning, do you mean create a class like
[TimelineLayoutVersion](https://github.com/apache/hudi/blob/5ee676e34fa2429d02ecd1a3cf7f586518ed2081/hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/TimelineLayoutVersion.java#L29)
or just simply handle this logic in the ```CleanActionExecutor```. For
example, if the parameter is a full file path then delete it. Else if the
parameter is a file name, generate the file path and then delete it.
----------------------------------------------------------------
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]