pub struct ScanScheduler { /* private fields */ }Expand description
An I/O scheduler which wraps an ObjectStore and throttles the amount of parallel I/O that can be run.
TODO: This will also add coalescing
Implementations§
Source§impl ScanScheduler
impl ScanScheduler
Sourcepub fn new(object_store: Arc<ObjectStore>, config: SchedulerConfig) -> Arc<Self>
pub fn new(object_store: Arc<ObjectStore>, config: SchedulerConfig) -> Arc<Self>
Create a new scheduler with the given I/O capacity
§Arguments
- object_store - the store to wrap
- config - configuration settings for the scheduler
Sourcepub async fn open_file_with_priority(
self: &Arc<Self>,
path: &Path,
base_priority: u64,
file_size_bytes: &CachedFileSize,
) -> Result<FileScheduler>
pub async fn open_file_with_priority( self: &Arc<Self>, path: &Path, base_priority: u64, file_size_bytes: &CachedFileSize, ) -> Result<FileScheduler>
Open a file for reading
§Arguments
- path - the path to the file to open
- base_priority - the base priority for I/O requests submitted to this file scheduler
this will determine the upper 64 bits of priority (the lower 64 bits
come from
submit_requestandsubmit_single)
Sourcepub async fn open_file(
self: &Arc<Self>,
path: &Path,
file_size_bytes: &CachedFileSize,
) -> Result<FileScheduler>
pub async fn open_file( self: &Arc<Self>, path: &Path, file_size_bytes: &CachedFileSize, ) -> Result<FileScheduler>
Open a file with a default priority of 0
See Self::open_file_with_priority for more information on the priority
pub fn stats(&self) -> ScanStats
Trait Implementations§
Source§impl Debug for ScanScheduler
impl Debug for ScanScheduler
Auto Trait Implementations§
impl Freeze for ScanScheduler
impl !RefUnwindSafe for ScanScheduler
impl Send for ScanScheduler
impl Sync for ScanScheduler
impl Unpin for ScanScheduler
impl !UnwindSafe for ScanScheduler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.