java.lang.Object
org.apache.arrow.vector.ipc.ArrowWriter
org.apache.arrow.vector.ipc.ArrowFileWriter
- All Implemented Interfaces:
AutoCloseable
ArrowWriter that writes out a Arrow files
(https://arrow.apache.org/docs/format/IPC.html#file-format).-
Field Summary
Fields inherited from class org.apache.arrow.vector.ipc.ArrowWriter
option, out, schema -
Constructor Summary
ConstructorsConstructorDescriptionArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out) ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData) ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option) ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType) ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType, Optional<Integer> compressionLevel) ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, IpcOption option) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidendInternal(WriteChannel out) protected voidensureDictionariesWritten(DictionaryProvider provider, Set<Long> dictionaryIdsUsed) Write dictionaries after schema and before recordBatches, dictionaries won't be written if empty stream (only has schema data in IPC).protected voidprotected ArrowBlockprotected ArrowBlockwriteRecordBatch(ArrowRecordBatch batch) Methods inherited from class org.apache.arrow.vector.ipc.ArrowWriter
bytesWritten, close, end, start, writeBatch, writeDictionaryBatch
-
Constructor Details
-
ArrowFileWriter
-
ArrowFileWriter
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData) -
ArrowFileWriter
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, IpcOption option) -
ArrowFileWriter
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option) -
ArrowFileWriter
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType) -
ArrowFileWriter
public ArrowFileWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, Map<String, String> metaData, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType, Optional<Integer> compressionLevel)
-
-
Method Details
-
startInternal
- Overrides:
startInternalin classArrowWriter- Throws:
IOException
-
writeDictionaryBatch
- Overrides:
writeDictionaryBatchin classArrowWriter- Throws:
IOException
-
writeRecordBatch
- Overrides:
writeRecordBatchin classArrowWriter- Throws:
IOException
-
endInternal
- Overrides:
endInternalin classArrowWriter- Throws:
IOException
-
ensureDictionariesWritten
protected void ensureDictionariesWritten(DictionaryProvider provider, Set<Long> dictionaryIdsUsed) throws IOException Description copied from class:ArrowWriterWrite dictionaries after schema and before recordBatches, dictionaries won't be written if empty stream (only has schema data in IPC).- Specified by:
ensureDictionariesWrittenin classArrowWriter- Throws:
IOException
-
getRecordBlocks
-
getDictionaryBlocks
-