pub struct AvroObjectReader {
store: Arc<dyn ObjectStore>,
path: Path,
runtime: Option<Handle>,
}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
Expand description
An implementation of an AsyncFileReader using the [ObjectStore] API.
Fields§
§store: Arc<dyn ObjectStore>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
path: PathImplement 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
runtime: Option<Handle>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
Implementations§
Source§impl AvroObjectReader
impl AvroObjectReader
Sourcepub fn new(store: Arc<dyn ObjectStore>, path: Path) -> Self
pub fn new(store: Arc<dyn ObjectStore>, path: Path) -> Self
Creates a new Self from a store implementation and file location.
Sourcepub fn with_runtime(self, handle: Handle) -> Self
👎Deprecated since 59.2.0: 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
Wrap the reader in a SpawnedReader instead, e.g. SpawnedReader::new(reader, handle). See also https://github.com/apache/arrow-rs/issues/10308
Perform IO on the provided tokio runtime
Tokio is a cooperative scheduler, and relies on tasks yielding in a timely manner to service IO. Therefore, running IO and CPU-bound tasks, such as avro decoding, on the same tokio runtime can lead to degraded throughput, dropped connections and other issues. For more information see here.
fn spawn<F, O, E>(&self, f: F) -> BoxFuture<'_, Result<O, AvroError>>
Trait Implementations§
Source§impl AsyncFileReader for AvroObjectReader
impl AsyncFileReader for AvroObjectReader
Source§impl Clone for AvroObjectReader
impl Clone for AvroObjectReader
Source§fn clone(&self) -> AvroObjectReader
fn clone(&self) -> AvroObjectReader
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more