public abstract class PartitionedWriter<T> extends BaseTaskWriter<T>
BaseTaskWriter.RollingFileWriter
Constructor and Description |
---|
PartitionedWriter(PartitionSpec spec,
FileFormat format,
FileAppenderFactory<T> appenderFactory,
OutputFileFactory fileFactory,
FileIO io,
long targetFileSize) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract PartitionKey |
partition(T row)
Create a PartitionKey from the values in row.
|
void |
write(T row)
Write the row into the data files.
|
abort, complete
public PartitionedWriter(PartitionSpec spec, FileFormat format, FileAppenderFactory<T> appenderFactory, OutputFileFactory fileFactory, FileIO io, long targetFileSize)
protected abstract PartitionKey partition(T row)
Any PartitionKey returned by this method can be reused by the implementation.
row
- a data rowpublic void write(T row) throws java.io.IOException
TaskWriter
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException