public class RowDataFileWriter extends StatsCollectingSingleFileWriter<InternalRow,DataFileMeta>
StatsCollectingSingleFileWriter to write data files containing InternalRow.
Also produces DataFileMeta after writing a file.SingleFileWriter.AbortExecutorclosed, 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) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
DataFileMeta |
result() |
void |
write(InternalRow row)
Add only one record to this file writer.
|
fieldStats, writeBundleabort, abortExecutor, path, reachTargetSize, recordCount, writeImplclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrite, write, writepublic 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)
public void write(InternalRow row) throws IOException
FileWriterNOTE: 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 Closeableclose in interface AutoCloseableclose in class SingleFileWriter<InternalRow,DataFileMeta>IOExceptionpublic DataFileMeta result() throws IOException
IOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.