Create a new RuntimeEnvBuilder from an existing RuntimeEnv
(runtime_env: &RuntimeEnv)
| 494 | |
| 495 | /// Create a new RuntimeEnvBuilder from an existing RuntimeEnv |
| 496 | pub fn from_runtime_env(runtime_env: &RuntimeEnv) -> Self { |
| 497 | let cache_config = CacheManagerConfig { |
| 498 | file_statistics_cache: runtime_env.cache_manager.get_file_statistic_cache(), |
| 499 | file_statistics_cache_limit: runtime_env |
| 500 | .cache_manager |
| 501 | .get_file_statistic_cache_limit(), |
| 502 | list_files_cache: runtime_env.cache_manager.get_list_files_cache(), |
| 503 | list_files_cache_limit: runtime_env |
| 504 | .cache_manager |
| 505 | .get_list_files_cache_limit(), |
| 506 | list_files_cache_ttl: runtime_env.cache_manager.get_list_files_cache_ttl(), |
| 507 | file_metadata_cache: Some( |
| 508 | runtime_env.cache_manager.get_file_metadata_cache(), |
| 509 | ), |
| 510 | metadata_cache_limit: runtime_env.cache_manager.get_metadata_cache_limit(), |
| 511 | }; |
| 512 | |
| 513 | Self { |
| 514 | #[expect(deprecated)] |
| 515 | disk_manager: DiskManagerConfig::Existing(Arc::clone( |
| 516 | &runtime_env.disk_manager, |
| 517 | )), |
| 518 | disk_manager_builder: None, |
| 519 | memory_pool: Some(Arc::clone(&runtime_env.memory_pool)), |
| 520 | cache_manager: cache_config, |
| 521 | object_store_registry: Arc::clone(&runtime_env.object_store_registry), |
| 522 | #[cfg(feature = "parquet_encryption")] |
| 523 | parquet_encryption_factory_registry: Arc::clone( |
| 524 | &runtime_env.parquet_encryption_factory_registry, |
| 525 | ), |
| 526 | } |
| 527 | } |
| 528 | |
| 529 | /// Returns a list of all available runtime configurations with their current values and descriptions |
| 530 | pub fn entries(&self) -> Vec<ConfigEntry> { |
nothing calls this directly
no test coverage detected