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
ConstructorDescriptionArrowFileWriter
(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 void
endInternal
(WriteChannel out) protected void
ensureDictionariesWritten
(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 void
protected ArrowBlock
protected ArrowBlock
writeRecordBatch
(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:
startInternal
in classArrowWriter
- Throws:
IOException
-
writeDictionaryBatch
- Overrides:
writeDictionaryBatch
in classArrowWriter
- Throws:
IOException
-
writeRecordBatch
- Overrides:
writeRecordBatch
in classArrowWriter
- Throws:
IOException
-
endInternal
- Overrides:
endInternal
in classArrowWriter
- Throws:
IOException
-
ensureDictionariesWritten
protected void ensureDictionariesWritten(DictionaryProvider provider, Set<Long> dictionaryIdsUsed) throws IOException Description copied from class:ArrowWriter
Write dictionaries after schema and before recordBatches, dictionaries won't be written if empty stream (only has schema data in IPC).- Specified by:
ensureDictionariesWritten
in classArrowWriter
- Throws:
IOException
-
getRecordBlocks
-
getDictionaryBlocks
-