public class RowDataFileWriter extends StatsCollectingSingleFileWriter<InternalRow,DataFileMeta>
StatsCollectingSingleFileWriter to write data files containing InternalRow.
Also produces DataFileMeta after writing a file.SingleFileWriter.AbortExecutorclosed, fileIO, outputBytes, path| Constructor and Description |
|---|
RowDataFileWriter(FileIO fileIO,
FileWriterContext context,
Path path,
RowType writeSchema,
long schemaId,
LongCounter seqNumCounter,
FileIndexOptions fileIndexOptions,
FileSource fileSource,
boolean asyncFileWrite,
boolean statsDenseStore,
boolean isExternalPath) |
| 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, FileWriterContext context, Path path, RowType writeSchema, long schemaId, LongCounter seqNumCounter, FileIndexOptions fileIndexOptions, FileSource fileSource, boolean asyncFileWrite, boolean statsDenseStore, boolean isExternalPath)
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–2025 The Apache Software Foundation. All rights reserved.