public class RowDataFileWriter extends StatsCollectingSingleFileWriter<org.apache.flink.table.data.RowData,DataFileMeta>
StatsCollectingSingleFileWriter
to write data files containing RowData
. Also
produces DataFileMeta
after writing a file.closed, path
Constructor and Description |
---|
RowDataFileWriter(org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData> factory,
org.apache.flink.core.fs.Path path,
org.apache.flink.table.types.logical.RowType writeSchema,
FileStatsExtractor fileStatsExtractor,
long schemaId,
org.apache.flink.api.common.accumulators.LongCounter seqNumCounter) |
Modifier and Type | Method and Description |
---|---|
DataFileMeta |
result() |
void |
write(org.apache.flink.table.data.RowData row)
Add only one record to this file writer.
|
fieldStats
abort, close, length, path, recordCount, writeImpl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, write, write
public RowDataFileWriter(org.apache.flink.api.common.serialization.BulkWriter.Factory<org.apache.flink.table.data.RowData> factory, org.apache.flink.core.fs.Path path, org.apache.flink.table.types.logical.RowType writeSchema, @Nullable FileStatsExtractor fileStatsExtractor, long schemaId, org.apache.flink.api.common.accumulators.LongCounter seqNumCounter)
public void write(org.apache.flink.table.data.RowData row) throws IOException
FileWriter
NOTE: If any exception occurs during writing, the writer should clean up useless files for the user.
write
in interface FileWriter<org.apache.flink.table.data.RowData,DataFileMeta>
write
in class StatsCollectingSingleFileWriter<org.apache.flink.table.data.RowData,DataFileMeta>
row
- to write.IOException
- if encounter any IO error.public DataFileMeta result() throws IOException
IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.