pub struct DiskManager { /* private fields */ }Expand description
Manages files generated during query execution, e.g. spill files generated while processing dataset larger than available memory.
Implementations§
Source§impl DiskManager
impl DiskManager
Sourcepub fn builder() -> DiskManagerBuilder
pub fn builder() -> DiskManagerBuilder
Creates a builder for DiskManager
Sourcepub fn set_max_temp_directory_size(
&self,
max_temp_directory_size: u64,
) -> Result<()>
pub fn set_max_temp_directory_size( &self, max_temp_directory_size: u64, ) -> Result<()>
Atomically set the max temp directory size at runtime.
Takes &self, so it works through Arc<DiskManager> without requiring
exclusive access. Takes effect immediately for subsequent spill writes.
Use this when you need to adjust the limit dynamically while queries are running (e.g., adapting to available disk space).
pub fn set_arc_max_temp_directory_size( this: &Arc<Self>, max_temp_directory_size: u64, ) -> Result<()>
Use set_max_temp_directory_size directly, it now takes &self
pub fn with_max_temp_directory_size( self, max_temp_directory_size: u64, ) -> Result<Self>
pub fn used_disk_space(&self) -> u64
Sourcepub fn max_temp_directory_size(&self) -> u64
pub fn max_temp_directory_size(&self) -> u64
Returns the maximum temporary directory size in bytes
Sourcepub fn set_max_spill_merge_fan_in(&self, max_spill_merge_fan_in: usize)
pub fn set_max_spill_merge_fan_in(&self, max_spill_merge_fan_in: usize)
Atomically set the maximum spill merge fan-in.
A value of 0 disables the cap. Values of 1 are accepted but external merge code will still merge at least two spill streams to make progress.
Sourcepub fn max_spill_merge_fan_in(&self) -> usize
pub fn max_spill_merge_fan_in(&self) -> usize
Returns the maximum number of spill files opened by one merge pass.
A value of 0 means unlimited.
Sourcepub fn spilling_progress(&self) -> SpillingProgress
pub fn spilling_progress(&self) -> SpillingProgress
Returns the current spilling progress
Sourcepub fn temp_dir_paths(&self) -> Vec<PathBuf>
pub fn temp_dir_paths(&self) -> Vec<PathBuf>
Returns the temporary directory paths
Sourcepub fn tmp_files_enabled(&self) -> bool
pub fn tmp_files_enabled(&self) -> bool
Return true if this disk manager supports creating temporary
files. If this returns false, any call to create_tmp_file
will error.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DiskManager
impl !RefUnwindSafe for DiskManager
impl !UnwindSafe for DiskManager
impl Send for DiskManager
impl Sync for DiskManager
impl Unpin for DiskManager
impl UnsafeUnpin for DiskManager
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
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> ⓘ
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> ⓘ
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 more