nastra commented on code in PR #14287:
URL: https://github.com/apache/iceberg/pull/14287#discussion_r2448528883
##########
api/src/main/java/org/apache/iceberg/ExpireSnapshots.java:
##########
@@ -116,9 +116,39 @@ public interface ExpireSnapshots extends
PendingUpdate<List<Snapshot>> {
*
* @param clean setting this to false will skip deleting expired manifests
and files
* @return this for method chaining
+ * @deprecated since 1.10.0, will be removed in 2.0.0; use {@link
#cleanMode(CleanupMode)}
+ * instead.
*/
+ @Deprecated
ExpireSnapshots cleanExpiredFiles(boolean clean);
+ /**
+ * Configures the cleanup mode for expired files.
+ *
+ * <p>This method provides fine-grained control over which files are cleaned
up during snapshot
+ * expiration. The cleanup modes are:
+ *
+ * <ul>
+ * <li>{@link CleanupMode#ALL} - Clean up both metadata and data files
(default)
+ * <li>{@link CleanupMode#METADATA_ONLY} - Clean up only metadata files
(manifests, manifest
+ * lists), retain data files
+ * <li>{@link CleanupMode#NONE} - Skip all file cleanup, only remove
snapshot metadata
+ * </ul>
+ *
+ * <p>consider METADATA_ONLY mode when data files are shared across tables
or when using
+ * procedures like add-files that may reference the same data files.
+ *
+ * <p>consider NONE mode when data and manifest files may be more
efficiently removed using a
+ * distributed framework through the actions API
+ *
+ * @param mode the cleanup mode to use for expired snapshots
+ * @return this for method chaining
+ */
+ default ExpireSnapshots cleanMode(CleanupMode mode) {
Review Comment:
```suggestion
default ExpireSnapshots cleanupMode(CleanupMode mode) {
```
--
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]