-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
Creating a DiskManager
today is somewhat awkward as described by @2010YOUY01 in #14975 (comment)
It would be nice to follow the builder pattern that is used elsewhere in DataFusion such a RuntimeEnvBuilder
-- see example
Describe the solution you'd like
I would like to have an API that looks like this (the with_max_temp_directory_size
is part of #14975)
let manager: Arc<DiskManager> = DiskManagerBuilder::new()
.with_max_temp_directory_size(100*1024*1024)
.build_arc();
Describe alternatives you've considered
I suggest:
- Renaming
DiskManagerConfig
toDiskManagerBuilder
- Leave a backwards compatible deprecated type (like is here
datafusion/datafusion/execution/src/runtime_env.rs
Lines 165 to 166 in 8e2bfa4
#[deprecated(since = "43.0.0", note = "please use `RuntimeEnvBuilder` instead")] pub type RuntimeConfig = RuntimeEnvBuilder; - Deprecate
DiskManager::try_new
- Add documentation example on DiskManager, similarly to the example on RuntimeEnv
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request