pub struct CacheManagerConfig {
pub table_files_statistics_cache: Option<FileStatisticsCache>,
pub list_files_cache: Option<ListFilesCache>,
pub file_metadata_cache: Option<Arc<dyn FileMetadataCache>>,
pub metadata_cache_limit: usize,
}
Fields§
§table_files_statistics_cache: Option<FileStatisticsCache>
Enable cache of files statistics when listing files. Avoid get same file statistics repeatedly in same datafusion session. Default is disable. Fow now only supports Parquet files.
list_files_cache: Option<ListFilesCache>
Enable cache of file metadata when listing files.
This setting avoids listing file meta of the same path repeatedly
in same session, which may be expensive in certain situations (e.g. remote object storage).
Note that if this option is enabled, DataFusion will not see any updates to the underlying
location.
Default is disable.
file_metadata_cache: Option<Arc<dyn FileMetadataCache>>
Cache of file-embedded metadata, used to avoid reading it multiple times when processing a
data file (e.g., Parquet footer and page metadata).
If not provided, the CacheManager
will create a DefaultFilesMetadataCache
.
metadata_cache_limit: usize
Limit of the file-embedded metadata cache, in bytes.
Implementations§
Source§impl CacheManagerConfig
impl CacheManagerConfig
Sourcepub fn with_files_statistics_cache(
self,
cache: Option<FileStatisticsCache>,
) -> Self
pub fn with_files_statistics_cache( self, cache: Option<FileStatisticsCache>, ) -> Self
Set the cache for files statistics.
Default is None
(disabled).
Sourcepub fn with_list_files_cache(self, cache: Option<ListFilesCache>) -> Self
pub fn with_list_files_cache(self, cache: Option<ListFilesCache>) -> Self
Set the cache for listing files.
Default is None
(disabled).
Sourcepub fn with_file_metadata_cache(
self,
cache: Option<Arc<dyn FileMetadataCache>>,
) -> Self
pub fn with_file_metadata_cache( self, cache: Option<Arc<dyn FileMetadataCache>>, ) -> Self
Sets the cache for file-embedded metadata.
Default is a DefaultFilesMetadataCache
.
Sourcepub fn with_metadata_cache_limit(self, limit: usize) -> Self
pub fn with_metadata_cache_limit(self, limit: usize) -> Self
Sets the limit of the file-embedded metadata cache, in bytes.
Trait Implementations§
Source§impl Clone for CacheManagerConfig
impl Clone for CacheManagerConfig
Source§fn clone(&self) -> CacheManagerConfig
fn clone(&self) -> CacheManagerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CacheManagerConfig
impl !RefUnwindSafe for CacheManagerConfig
impl Send for CacheManagerConfig
impl Sync for CacheManagerConfig
impl Unpin for CacheManagerConfig
impl !UnwindSafe for CacheManagerConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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