Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion arrow-avro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@
//! [`AsyncAvroFileReader`] implements `Stream<Item = Result<RecordBatch, ArrowError>>`,
//! allowing efficient async streaming of record batches. Any [`AsyncFileReader`]
//! can be used as the source; there is a built-in implementation for types
//! implementing `AsyncRead + AsyncSeek` (such as `tokio::fs::File`), and object
//! implementing [`AsyncRead`] + [`AsyncSeek`] (such as [`tokio::fs::File`]), and object
//! storage services such as S3 can be integrated by implementing
//! [`AsyncFileReader`] on top of a client such as the [object_store] crate
//! (see the example on the trait documentation).
//!
//! [`AsyncRead`]: tokio::io::AsyncRead
//! [`AsyncSeek`]: tokio::io::AsyncSeek
//! [`tokio::fs::File`]: https://docs.rs/tokio/latest/tokio/fs/struct.File.html
//!
//! ```ignore
//! use arrow_avro::reader::AsyncAvroFileReader;
//! use futures::TryStreamExt;
Expand Down
4 changes: 3 additions & 1 deletion arrow-avro/src/reader/async_reader/async_file_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ use tokio::io::{AsyncRead, AsyncReadExt, AsyncSeek, AsyncSeekExt};
/// 1. There is a default implementation for types that implement [`AsyncRead`]
/// and [`AsyncSeek`], for example [`tokio::fs::File`].
///
/// 2. Implementations for remote storage, such as the `object_store` crate,
/// 2. Implementations for remote storage, such as the [`object_store`] crate,
/// can implement this interface directly, typically by pairing a store
/// handle with an object path and delegating [`Self::get_bytes`] and
/// [`Self::get_byte_ranges`] to ranged reads. [`super::SpawnedReader`] can
/// wrap such a reader to perform its I/O on a dedicated tokio runtime.
///
/// [`object_store`]: https://crates.io/crates/object_store
///
/// # Example: implementing `AsyncFileReader` for the `object_store` crate
///
/// ```no_run
Expand Down
4 changes: 2 additions & 2 deletions arrow-avro/src/reader/async_reader/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use tokio::runtime::Handle;
/// An implementation of an AsyncFileReader using the [`ObjectStore`] API.
#[deprecated(
since = "59.2.0",
note = "Implement `AsyncFileReader` directly instead; see the example on the `AsyncFileReader` trait documentation and `arrow-avro/examples/object_store.rs`. Use `SpawnedReader` to perform I/O on a dedicated runtime."
note = "Implement `AsyncFileReader` directly instead; see the example on the `AsyncFileReader` trait documentation and `arrow-avro/examples/object_store.rs`. Use `SpawnedReader` to perform I/O on a dedicated runtime. See also https://github.com/apache/arrow-rs/issues/10308"
)]
#[derive(Clone, Debug)]
pub struct AvroObjectReader {
Expand Down Expand Up @@ -61,7 +61,7 @@ impl AvroObjectReader {
/// [here]: https://www.influxdata.com/blog/using-rustlangs-async-tokio-runtime-for-cpu-bound-tasks/
#[deprecated(
since = "59.2.0",
note = "Wrap the reader in a `SpawnedReader` instead, e.g. `SpawnedReader::new(reader, handle)`"
note = "Wrap the reader in a `SpawnedReader` instead, e.g. `SpawnedReader::new(reader, handle)`. See also https://github.com/apache/arrow-rs/issues/10308"
)]
pub fn with_runtime(self, handle: Handle) -> Self {
Self {
Expand Down
Loading