public class RowDataFileWriter extends StatsCollectingSingleFileWriter<InternalRow,DataFileMeta>
StatsCollectingSingleFileWriter
to write data files containing InternalRow
.
Also produces DataFileMeta
after writing a file.SingleFileWriter.AbortExecutor
closed, fileIO, path
Constructor and Description |
---|
RowDataFileWriter(FileIO fileIO,
FormatWriterFactory factory,
Path path,
RowType writeSchema,
SimpleStatsExtractor simpleStatsExtractor,
long schemaId,
LongCounter seqNumCounter,
String fileCompression,
SimpleColStatsCollector.Factory[] statsCollectors,
FileIndexOptions fileIndexOptions,
FileSource fileSource,
boolean asyncFileWrite,
boolean statsDenseStore) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
DataFileMeta |
result() |
void |
write(InternalRow row)
Add only one record to this file writer.
|
fieldStats, writeBundle
abort, abortExecutor, path, reachTargetSize, recordCount, writeImpl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, write, write
public RowDataFileWriter(FileIO fileIO, FormatWriterFactory factory, Path path, RowType writeSchema, @Nullable SimpleStatsExtractor simpleStatsExtractor, long schemaId, LongCounter seqNumCounter, String fileCompression, SimpleColStatsCollector.Factory[] statsCollectors, FileIndexOptions fileIndexOptions, FileSource fileSource, boolean asyncFileWrite, boolean statsDenseStore)
public void write(InternalRow 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<InternalRow,DataFileMeta>
write
in class StatsCollectingSingleFileWriter<InternalRow,DataFileMeta>
row
- to write.IOException
- if encounter any IO error.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class SingleFileWriter<InternalRow,DataFileMeta>
IOException
public DataFileMeta result() throws IOException
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.