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
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|
Groups an existing
Determines which existing
RewriteManifests clusterBy(java.util.function.Function<DataFile,java.lang.Object> func)
DataFileby 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)
ManifestFilefor 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.