[HUDI-80] Leverage Commit metadata to figure out partitions to be cleaned for Cleaning by commits mode (#1008)
This commit is contained in:
committed by
vinoth chandar
parent
0bb5999f79
commit
8ff06ddb0f
@@ -115,7 +115,7 @@ public class HoodieCleanStat implements Serializable {
|
||||
|
||||
public Builder withEarliestCommitRetained(Option<HoodieInstant> earliestCommitToRetain) {
|
||||
this.earliestCommitToRetain =
|
||||
(earliestCommitToRetain.isPresent()) ? earliestCommitToRetain.get().getTimestamp() : "-1";
|
||||
(earliestCommitToRetain.isPresent()) ? earliestCommitToRetain.get().getTimestamp() : "";
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -124,4 +124,16 @@ public class HoodieCleanStat implements Serializable {
|
||||
earliestCommitToRetain);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HoodieCleanStat{"
|
||||
+ "policy=" + policy
|
||||
+ ", partitionPath='" + partitionPath + '\''
|
||||
+ ", deletePathPatterns=" + deletePathPatterns
|
||||
+ ", successDeleteFiles=" + successDeleteFiles
|
||||
+ ", failedDeleteFiles=" + failedDeleteFiles
|
||||
+ ", earliestCommitToRetain='" + earliestCommitToRetain + '\''
|
||||
+ '}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class HoodieActiveTimeline extends HoodieDefaultTimeline {
|
||||
/**
|
||||
* Get only pure commits (inflight and completed) in the active timeline
|
||||
*/
|
||||
public HoodieTimeline getCommitTimeline() {
|
||||
public HoodieTimeline getCommitTimeline() {
|
||||
return getTimelineOfActions(Sets.newHashSet(COMMIT_ACTION));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user