You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/19 18:15:14 UTC

[GitHub] [iceberg] ajantha-bhat commented on a change in pull request #3772: [Api][Spark]Add cleanExpiredFiles to Actions/ExpireSnapshots

ajantha-bhat commented on a change in pull request #3772:
URL: https://github.com/apache/iceberg/pull/3772#discussion_r771983427



##########
File path: api/src/main/java/org/apache/iceberg/actions/ExpireSnapshots.java
##########
@@ -92,6 +92,16 @@
    */
   ExpireSnapshots executeDeleteWith(ExecutorService executorService);
 
+  /**
+   * Allows expiration of snapshots without any cleanup of underlying manifest or data files.
+   * <p>
+   * If {@code cleanEnabled} is set to false, data and manifest files should not been cleaned after expiration.
+   *
+   * @param cleanEnabled setting this to false will skip deleting expired manifests and files
+   * @return this for method chaining
+   */
+  ExpireSnapshots cleanExpiredFiles(boolean cleanEnabled);

Review comment:
       This action is already having `deleteWith(Consumer<String> deleteFunc);` method. 
   **we can plugin dummy consumer method to avoid deleting the files.**
   
   Default implementation is to delete files. 
   https://github.com/apache/iceberg/blob/master/spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/actions/BaseExpireSnapshotsSparkAction.java#L84-L89




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org