parquet::arrow::async_writer

Trait AsyncFileWriter

Source
pub trait AsyncFileWriter: Send {
    // Required methods
    fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>>;
    fn complete(&mut self) -> BoxFuture<'_, Result<()>>;
}
Expand description

The asynchronous interface used by AsyncArrowWriter to write parquet files.

Required Methods§

Source

fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>>

Write the provided bytes to the underlying writer

The underlying writer CAN decide to buffer the data or write it immediately. This design allows the writer implementer to control the buffering and I/O scheduling.

The underlying writer MAY implement retry logic to prevent breaking users write process.

Source

fn complete(&mut self) -> BoxFuture<'_, Result<()>>

Flush any buffered data to the underlying writer and finish writing process.

After complete returns Ok(()), caller SHOULD not call write again.

Trait Implementations§

Source§

impl AsyncFileWriter for Box<dyn AsyncFileWriter>

Source§

fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>>

Write the provided bytes to the underlying writer Read more
Source§

fn complete(&mut self) -> BoxFuture<'_, Result<()>>

Flush any buffered data to the underlying writer and finish writing process. Read more

Implementations on Foreign Types§

Source§

impl AsyncFileWriter for Box<dyn AsyncFileWriter>

Source§

fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>>

Source§

fn complete(&mut self) -> BoxFuture<'_, Result<()>>

Implementors§