Package org.apache.iceberg
Interface RewriteFiles
-
- All Superinterfaces:
PendingUpdate<Snapshot>
,SnapshotUpdate<RewriteFiles>
public interface RewriteFiles extends SnapshotUpdate<RewriteFiles>
API for replacing files in a table.This API accumulates file additions and deletions, produces a new
Snapshot
of the changes, and commits that snapshot as the current.When committing, these changes will be applied to the latest table snapshot. Commit conflicts will be resolved by applying the changes to the new latest snapshot and reattempting the commit. If any of the deleted files are no longer in the latest snapshot when reattempting, the commit will throw a
ValidationException
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RewriteFiles
rewriteFiles(java.util.Set<DataFile> filesToDelete, java.util.Set<DataFile> filesToAdd)
Add a rewrite that replaces one set of files with another set that contains the same data.-
Methods inherited from interface org.apache.iceberg.PendingUpdate
apply, commit, updateEvent
-
Methods inherited from interface org.apache.iceberg.SnapshotUpdate
deleteWith, set, stageOnly
-
-
-
-
Method Detail
-
rewriteFiles
RewriteFiles rewriteFiles(java.util.Set<DataFile> filesToDelete, java.util.Set<DataFile> filesToAdd)
Add a rewrite that replaces one set of files with another set that contains the same data.- Parameters:
filesToDelete
- files that will be replaced (deleted), cannot be null or empty.filesToAdd
- files that will be added, cannot be null or empty.- Returns:
- this for method chaining
-
-