- Type Parameters:
T- the row type
R- the result type
- All Superinterfaces:
- All Known Implementing Classes:
public interface FileWriter<T,R> extends java.io.CloseableA writer capable of writing files of a single type (i.e. data/delete) to one spec/partition.
As opposed to
FileAppender, this interface should be implemented by classes that not only append records to files but actually produce
DeleteFiles objects with Iceberg metadata. Implementations may wrap
FileAppenders with extra information such as spec, partition, sort order ID needed to construct
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description
length()Returns the number of bytes that were currently written by this writer.
write(java.lang.Iterable<T> rows)Writes rows to a predefined spec/partition.
write(T row)Writes a row to a predefined spec/partition.
default void write(java.lang.Iterable<T> rows)Writes rows to a predefined spec/partition.
rows- data or delete records
void write(T row)Writes a row to a predefined spec/partition.
row- a data or delete record
long length()Returns the number of bytes that were currently written by this writer.
- the number of written bytes