Class ArrowStreamWriter

java.lang.Object
org.apache.arrow.vector.ipc.ArrowWriter
org.apache.arrow.vector.ipc.ArrowStreamWriter
All Implemented Interfaces:
AutoCloseable

public class ArrowStreamWriter extends ArrowWriter
Writer for the Arrow stream format to send ArrowRecordBatches over a WriteChannel.
  • Constructor Details

    • ArrowStreamWriter

      public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, OutputStream out)
      Construct an ArrowStreamWriter with an optional DictionaryProvider for the OutputStream.
      Parameters:
      root - Existing VectorSchemaRoot with vectors to be written.
      provider - DictionaryProvider for any vectors that are dictionary encoded. (Optional, can be null)
      out - OutputStream for writing.
    • ArrowStreamWriter

      public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out)
      Construct an ArrowStreamWriter with an optional DictionaryProvider for the WritableByteChannel.
    • ArrowStreamWriter

      public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, IpcOption option)
      Construct an ArrowStreamWriter with an optional DictionaryProvider for the WritableByteChannel.
      Parameters:
      root - Existing VectorSchemaRoot with vectors to be written.
      provider - DictionaryProvider for any vectors that are dictionary encoded. (Optional, can be null)
      option - IPC write options
      out - WritableByteChannel for writing.
    • ArrowStreamWriter

      public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType)
      Construct an ArrowStreamWriter with compression enabled.
      Parameters:
      root - Existing VectorSchemaRoot with vectors to be written.
      provider - DictionaryProvider for any vectors that are dictionary encoded. (Optional, can be null)
      option - IPC write options
      compressionFactory - Compression codec factory
      codecType - Codec type
      out - WritableByteChannel for writing.
    • ArrowStreamWriter

      public ArrowStreamWriter(VectorSchemaRoot root, DictionaryProvider provider, WritableByteChannel out, IpcOption option, CompressionCodec.Factory compressionFactory, CompressionUtil.CodecType codecType, Optional<Integer> compressionLevel)
      Construct an ArrowStreamWriter with compression enabled.
      Parameters:
      root - Existing VectorSchemaRoot with vectors to be written.
      provider - DictionaryProvider for any vectors that are dictionary encoded. (Optional, can be null)
      option - IPC write options
      compressionFactory - Compression codec factory
      codecType - Codec type
      compressionLevel - Compression level
      out - WritableByteChannel for writing.
  • Method Details