public interface RewriteManifests extends SnapshotUpdate<RewriteManifests>
This API accumulates manifest files, produces a new Snapshot
of the table
described only by the manifest files that were added, 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.
Modifier and Type | Method and Description |
---|---|
RewriteManifests |
clusterBy(java.util.function.Function<DataFile,java.lang.Object> func)
Groups an existing
DataFile by a cluster key produced by a function. |
RewriteManifests |
rewriteIf(java.util.function.Predicate<ManifestFile> predicate)
Determines which existing
ManifestFile for the table should be rewritten. |
deleteWith, set, stageOnly
apply, commit
RewriteManifests clusterBy(java.util.function.Function<DataFile,java.lang.Object> func)
DataFile
by a cluster key produced by a function. The cluster key
will determine which data file will be associated with a particular manifest. All data files
with the same cluster key will be written to the same manifest (unless the file is large and
split into multiple files).func
- Function used to cluster data files to manifests.RewriteManifests rewriteIf(java.util.function.Predicate<ManifestFile> predicate)
ManifestFile
for the table should be rewritten. Manifests
that do not match the predicate are kept as-is. If this is not called and no predicate is set, then
all manifests will be rewritten.predicate
- Predicate used to determine which manifests to rewrite. If true then the manifest
file will be included for rewrite. If false then then manifest is kept as-is.