Skip to main content

Module async_reader

Module async_reader 

Source
Expand description

Asynchronous implementation of Avro file reader.

This module provides AsyncAvroFileReader, which supports reading and decoding the Avro OCF format from any source that implements AsyncFileReader.

Re-exportsยง

use crate::compression::CompressionCodec; ๐Ÿ”’
use crate::reader::Decoder; ๐Ÿ”’
use crate::reader::block::BlockDecoder; ๐Ÿ”’
use crate::reader::block::BlockDecoderState; ๐Ÿ”’
use arrow_array::RecordBatch; ๐Ÿ”’
use arrow_schema::ArrowError; ๐Ÿ”’
use arrow_schema::SchemaRef; ๐Ÿ”’
use bytes::Bytes; ๐Ÿ”’
use futures::future::BoxFuture; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use std::mem; ๐Ÿ”’
use std::ops::Range; ๐Ÿ”’
use std::pin::Pin; ๐Ÿ”’
use std::task::Context; ๐Ÿ”’
use std::task::Poll; ๐Ÿ”’
use crate::errors::AvroError; ๐Ÿ”’

Modulesยง

async_file_reader ๐Ÿ”’
builder ๐Ÿ”’
spawn ๐Ÿ”’
store ๐Ÿ”’

Structsยง

AsyncAvroFileReader
An asynchronous Avro file reader that implements Stream<Item = Result<RecordBatch, ArrowError>>. This uses an AsyncFileReader to fetch data ranges as needed, starting with fetching the header, then reading all the blocks in the provided range where:
AvroObjectReaderDeprecated
An implementation of an AsyncFileReader using the [ObjectStore] API.
ReaderBuilder
Builder for an asynchronous Avro file reader.
SpawnedReader
An AsyncFileReader that performs I/O on a separate tokio runtime.

Enumsยง

FetchNextBehaviour ๐Ÿ”’
ReaderState ๐Ÿ”’

Traitsยง

AsyncFileReader
The asynchronous interface used by super::AsyncAvroFileReader to read avro files

Functionsยง

read_header_info
Reads the Avro file header (magic, metadata, sync marker) asynchronously from reader.