F - Java class of files written to the manifest, either DataFile or DeleteFile.public abstract class ManifestWriter<F extends ContentFile<F>> extends java.lang.Object implements FileAppender<F>
| Modifier and Type | Method and Description |
|---|---|
void |
add(F addedFile)
Add an added entry for a file.
|
void |
add(F addedFile,
long sequenceNumber)
Add an added entry for a file with a specific sequence number.
|
void |
close() |
protected ManifestContent |
content() |
void |
delete(F deletedFile)
Add a delete entry for a file.
|
void |
existing(F existingFile,
long fileSnapshotId,
long sequenceNumber)
Add an existing entry for a file.
|
long |
length()
Returns the length of this file.
|
Metrics |
metrics()
Returns
Metrics for this file. |
protected abstract FileAppender<org.apache.iceberg.ManifestEntry<F>> |
newAppender(PartitionSpec spec,
OutputFile outputFile) |
protected abstract org.apache.iceberg.ManifestEntry<F> |
prepare(org.apache.iceberg.ManifestEntry<F> entry) |
ManifestFile |
toManifestFile() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAll, addAll, splitOffsetsprotected abstract org.apache.iceberg.ManifestEntry<F> prepare(org.apache.iceberg.ManifestEntry<F> entry)
protected abstract FileAppender<org.apache.iceberg.ManifestEntry<F>> newAppender(PartitionSpec spec, OutputFile outputFile)
protected ManifestContent content()
public void add(F addedFile)
The entry's snapshot ID will be this manifest's snapshot ID.
add in interface FileAppender<F extends ContentFile<F>>addedFile - a data filepublic void add(F addedFile, long sequenceNumber)
The entry's snapshot ID will be this manifest's snapshot ID. The entry's sequence number will be the provided sequence number.
addedFile - a data filesequenceNumber - sequence number for the data filepublic void existing(F existingFile, long fileSnapshotId, long sequenceNumber)
existingFile - a filefileSnapshotId - snapshot ID when the data file was added to the tablesequenceNumber - sequence number for the data filepublic void delete(F deletedFile)
The entry's snapshot ID will be this manifest's snapshot ID.
deletedFile - a filepublic Metrics metrics()
FileAppenderMetrics for this file. Only valid after the file is closed.metrics in interface FileAppender<F extends ContentFile<F>>public long length()
FileAppenderlength in interface FileAppender<F extends ContentFile<F>>public ManifestFile toManifestFile()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException