Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
arrow::ipc::RecordBatchStreamWriter Class Reference

Synchronous batch stream writer that writes the Arrow streaming format. More...

#include <arrow/ipc/writer.h>

Inheritance diagram for arrow::ipc::RecordBatchStreamWriter:
arrow::ipc::RecordBatchWriter arrow::ipc::RecordBatchFileWriter

Public Member Functions

virtual ~RecordBatchStreamWriter ()
 
Status WriteRecordBatch (const RecordBatch &batch, bool allow_64bit=false) override
 Write a record batch to the stream. More...
 
Status Close () override
 Close the stream by writing a 4-byte int32 0 EOS market. More...
 
void set_memory_pool (MemoryPool *pool) override
 In some cases, writing may require memory allocation. More...
 
- Public Member Functions inherited from arrow::ipc::RecordBatchWriter
virtual ~RecordBatchWriter ()
 
Status WriteTable (const Table &table)
 Write possibly-chunked table by creating sequence of record batches. More...
 

Static Public Member Functions

static Status Open (io::OutputStream *sink, const std::shared_ptr< Schema > &schema, std::shared_ptr< RecordBatchWriter > *out)
 Create a new writer from stream sink and schema. More...
 

Protected Member Functions

 RecordBatchStreamWriter ()
 

Protected Attributes

class ARROW_NO_EXPORT RecordBatchStreamWriterImpl
 
std::unique_ptr< RecordBatchStreamWriterImplimpl_
 

Detailed Description

Synchronous batch stream writer that writes the Arrow streaming format.

Constructor & Destructor Documentation

◆ ~RecordBatchStreamWriter()

virtual arrow::ipc::RecordBatchStreamWriter::~RecordBatchStreamWriter ( )
virtual

◆ RecordBatchStreamWriter()

arrow::ipc::RecordBatchStreamWriter::RecordBatchStreamWriter ( )
protected

Member Function Documentation

◆ Close()

Status arrow::ipc::RecordBatchStreamWriter::Close ( )
overridevirtual

Close the stream by writing a 4-byte int32 0 EOS market.

Returns
Status

Implements arrow::ipc::RecordBatchWriter.

Reimplemented in arrow::ipc::RecordBatchFileWriter.

◆ Open()

static Status arrow::ipc::RecordBatchStreamWriter::Open ( io::OutputStream sink,
const std::shared_ptr< Schema > &  schema,
std::shared_ptr< RecordBatchWriter > *  out 
)
static

Create a new writer from stream sink and schema.

User is responsible for closing the actual OutputStream.

Parameters
[in]sinkoutput stream to write to
[in]schemathe schema of the record batches to be written
[out]outthe created stream writer
Returns
Status

◆ set_memory_pool()

void arrow::ipc::RecordBatchStreamWriter::set_memory_pool ( MemoryPool pool)
overridevirtual

In some cases, writing may require memory allocation.

We use the default memory pool, but provide the option to override

Parameters
poolthe memory pool to use for required allocations

Implements arrow::ipc::RecordBatchWriter.

◆ WriteRecordBatch()

Status arrow::ipc::RecordBatchStreamWriter::WriteRecordBatch ( const RecordBatch batch,
bool  allow_64bit = false 
)
overridevirtual

Write a record batch to the stream.

Parameters
[in]batchthe record batch to write
[in]allow_64bitallow array lengths over INT32_MAX - 1
Returns
Status

Implements arrow::ipc::RecordBatchWriter.

Reimplemented in arrow::ipc::RecordBatchFileWriter.

Member Data Documentation

◆ impl_

std::unique_ptr<RecordBatchStreamWriterImpl> arrow::ipc::RecordBatchStreamWriter::impl_
protected

◆ RecordBatchStreamWriterImpl

class ARROW_NO_EXPORT arrow::ipc::RecordBatchStreamWriter::RecordBatchStreamWriterImpl
protected

The documentation for this class was generated from the following file: