public abstract class ManifestWriter extends java.lang.Object implements FileAppender<DataFile>
| Modifier and Type | Method and Description |
|---|---|
void |
add(DataFile addedFile)
Add an added entry for a data file.
|
void |
close() |
void |
delete(DataFile deletedFile)
Add a delete entry for a data file.
|
void |
existing(DataFile existingFile,
long fileSnapshotId,
long sequenceNumber)
Add an existing entry for a data file.
|
long |
length() |
Metrics |
metrics() |
protected abstract FileAppender<org.apache.iceberg.ManifestEntry> |
newAppender(PartitionSpec spec,
OutputFile outputFile) |
protected abstract org.apache.iceberg.ManifestEntry |
prepare(org.apache.iceberg.ManifestEntry entry) |
ManifestFile |
toManifestFile() |
static ManifestWriter |
write(PartitionSpec spec,
OutputFile outputFile)
Deprecated.
will be removed in 0.9.0; use
ManifestFiles.write(PartitionSpec, OutputFile) instead. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAll, addAll, splitOffsets@Deprecated public static ManifestWriter write(PartitionSpec spec, OutputFile outputFile)
ManifestFiles.write(PartitionSpec, OutputFile) instead.ManifestWriter.
Manifests created by this writer have all entry snapshot IDs set to null. All entries will inherit the snapshot ID that will be assigned to the manifest on commit.
spec - PartitionSpec used to produce DataFile partition tuplesoutputFile - the destination file locationprotected abstract org.apache.iceberg.ManifestEntry prepare(org.apache.iceberg.ManifestEntry entry)
protected abstract FileAppender<org.apache.iceberg.ManifestEntry> newAppender(PartitionSpec spec, OutputFile outputFile)
public void add(DataFile addedFile)
The entry's snapshot ID will be this manifest's snapshot ID.
add in interface FileAppender<DataFile>addedFile - a data filepublic void existing(DataFile existingFile, long fileSnapshotId, long sequenceNumber)
existingFile - a data filefileSnapshotId - snapshot ID when the data file was added to the tablesequenceNumber - sequence number for the data filepublic void delete(DataFile deletedFile)
The entry's snapshot ID will be this manifest's snapshot ID.
deletedFile - a data filepublic Metrics metrics()
metrics in interface FileAppender<DataFile>Metrics for this file. Only valid after the file is closed.public long length()
length in interface FileAppender<DataFile>public ManifestFile toManifestFile()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException