pvary commented on code in PR #15566:
URL: https://github.com/apache/iceberg/pull/15566#discussion_r2946006072
##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/maintenance/api/ExpireSnapshots.java:
##########
@@ -107,6 +108,22 @@ public Builder cleanExpiredMetadata(boolean
newCleanExpiredMetadata) {
return this;
}
+ public Builder config(ExpireSnapshotsConfig expireSnapshotsConfig) {
+ this.scheduleOnCommitCount(expireSnapshotsConfig.scheduleOnCommitCount())
+
.scheduleOnInterval(Duration.ofSeconds(expireSnapshotsConfig.scheduleOnIntervalSecond()));
+
+ this.deleteBatchSize(expireSnapshotsConfig.deleteBatchSize());
+ this.maxSnapshotAge(
+ Optional.ofNullable(expireSnapshotsConfig.maxSnapshotAgeSeconds())
+ .map(Duration::ofSeconds)
+ .orElse(null));
+ this.retainLast(expireSnapshotsConfig.retainLast());
+ this.cleanExpiredMetadata(expireSnapshotsConfig.cleanExpiredMetadata());
+
this.planningWorkerPoolSize(expireSnapshotsConfig.planningWorkerPoolSize());
+
+ return this;
Review Comment:
```suggestion
return
this.scheduleOnCommitCount(expireSnapshotsConfig.scheduleOnCommitCount())
.scheduleOnInterval(Duration.ofSeconds(expireSnapshotsConfig.scheduleOnIntervalSecond()))
.deleteBatchSize(expireSnapshotsConfig.deleteBatchSize())
.maxSnapshotAge(
Optional.ofNullable(expireSnapshotsConfig.maxSnapshotAgeSeconds())
.map(Duration::ofSeconds)
.orElse(null));
.retainLast(expireSnapshotsConfig.retainLast())
.cleanExpiredMetadata(expireSnapshotsConfig.cleanExpiredMetadata())
.planningWorkerPoolSize(expireSnapshotsConfig.planningWorkerPoolSize());
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]