pub struct CacheManagerConfig {
pub table_files_statistics_cache: Option<Arc<dyn CacheAccessor<Path, Arc<Statistics>, Extra = ObjectMeta>>>,
pub list_files_cache: Option<Arc<dyn CacheAccessor<Path, Arc<Vec<ObjectMeta>>, Extra = ObjectMeta>>>,
pub file_metadata_cache: Option<Arc<dyn FileMetadataCache<Extra = ObjectMeta>>>,
pub metadata_cache_limit: usize,
}Fields§
§table_files_statistics_cache: Option<Arc<dyn CacheAccessor<Path, Arc<Statistics>, Extra = ObjectMeta>>>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<Arc<dyn CacheAccessor<Path, Arc<Vec<ObjectMeta>>, Extra = ObjectMeta>>>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<Extra = ObjectMeta>>>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: usizeLimit of the file-embedded metadata cache, in bytes.
Implementations§
Source§impl CacheManagerConfig
impl CacheManagerConfig
Sourcepub fn with_files_statistics_cache(
self,
cache: Option<Arc<dyn CacheAccessor<Path, Arc<Statistics>, Extra = ObjectMeta>>>,
) -> CacheManagerConfig
pub fn with_files_statistics_cache( self, cache: Option<Arc<dyn CacheAccessor<Path, Arc<Statistics>, Extra = ObjectMeta>>>, ) -> CacheManagerConfig
Set the cache for files statistics.
Default is None (disabled).
Sourcepub fn with_list_files_cache(
self,
cache: Option<Arc<dyn CacheAccessor<Path, Arc<Vec<ObjectMeta>>, Extra = ObjectMeta>>>,
) -> CacheManagerConfig
pub fn with_list_files_cache( self, cache: Option<Arc<dyn CacheAccessor<Path, Arc<Vec<ObjectMeta>>, Extra = ObjectMeta>>>, ) -> CacheManagerConfig
Set the cache for listing files.
Default is None (disabled).
Sourcepub fn with_file_metadata_cache(
self,
cache: Option<Arc<dyn FileMetadataCache<Extra = ObjectMeta>>>,
) -> CacheManagerConfig
pub fn with_file_metadata_cache( self, cache: Option<Arc<dyn FileMetadataCache<Extra = ObjectMeta>>>, ) -> CacheManagerConfig
Sets the cache for file-embedded metadata.
Default is a DefaultFilesMetadataCache.
Sourcepub fn with_metadata_cache_limit(self, limit: usize) -> CacheManagerConfig
pub fn with_metadata_cache_limit(self, limit: usize) -> CacheManagerConfig
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 moreSource§impl Default for CacheManagerConfig
impl Default for CacheManagerConfig
Source§fn default() -> CacheManagerConfig
fn default() -> CacheManagerConfig
Auto 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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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