T
- the row typeR
- the result typepublic interface PartitioningWriter<T,R>
extends java.io.Closeable
As opposed to FileWriter
, this interface should be implemented by writers that are not
limited to writing to a single spec/partition. Implementations may internally use FileWriter
s for writing to a single spec/partition.
Note that this writer can be used both for partitioned and unpartitioned tables.
Modifier and Type | Method and Description |
---|---|
R |
result()
Returns a result that contains information about written
DataFile s or DeleteFile s. |
void |
write(T row,
PartitionSpec spec,
StructLike partition)
Writes a row to the provided spec/partition.
|
void write(T row, PartitionSpec spec, StructLike partition)
row
- a data or delete recordspec
- a partition specpartition
- a partition or null if the spec is unpartitionedR result()
DataFile
s or DeleteFile
s. The result is valid only after the writer is closed.