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, 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, 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, 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
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–2025 The Apache Software Foundation. All rights reserved.