From 31062030783cf763e32357c0a0a29972cd2c784b Mon Sep 17 00:00:00 2001 From: Linwei Zhang Date: Mon, 1 Jan 2024 20:57:00 +0800 Subject: [PATCH] delete cache config --- .gitmodules | 0 ballista/core/src/config.rs | 21 ------------------ ballista/executor/executor_config_spec.toml | 24 +-------------------- ballista/executor/src/bin/main.rs | 4 ---- ballista/executor/src/executor_process.rs | 6 +----- 5 files changed, 2 insertions(+), 53 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/ballista/core/src/config.rs b/ballista/core/src/config.rs index ddc2250d8..4be9ba2f2 100644 --- a/ballista/core/src/config.rs +++ b/ballista/core/src/config.rs @@ -339,27 +339,6 @@ impl parse_arg::ParseArgFromStr for LogRotationPolicy { } } -// an enum used to configure the source data cache policy -// needs to be visible to code generated by configure_me -#[derive(Clone, ArgEnum, Copy, Debug, serde::Deserialize)] -pub enum DataCachePolicy { - LocalDiskFile, -} - -impl std::str::FromStr for DataCachePolicy { - type Err = String; - - fn from_str(s: &str) -> std::result::Result { - ArgEnum::from_str(s, true) - } -} - -impl parse_arg::ParseArgFromStr for DataCachePolicy { - fn describe_type(mut writer: W) -> fmt::Result { - write!(writer, "The data cache policy") - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/ballista/executor/executor_config_spec.toml b/ballista/executor/executor_config_spec.toml index d0fe58e07..2e03c27b1 100644 --- a/ballista/executor/executor_config_spec.toml +++ b/ballista/executor/executor_config_spec.toml @@ -142,26 +142,4 @@ doc = "The maximum size of an encoded message at the grpc server side. Default: name = "executor_heartbeat_interval_seconds" type = "u64" doc = "The heartbeat interval in seconds to the scheduler for push-based task scheduling" -default = "60" - -[[param]] -name = "data_cache_policy" -type = "ballista_core::config::DataCachePolicy" -doc = "Data cache policy, possible values: local-disk-file" - -[[param]] -name = "cache_dir" -type = "String" -doc = "Directory for cached source data" - -[[param]] -name = "cache_capacity" -type = "u64" -doc = "The maximum capacity can be used for cache. Default: 1GB" -default = "1073741824" - -[[param]] -name = "cache_io_concurrency" -type = "u32" -doc = "The number of worker threads for the runtime of caching. Default: 2" -default = "2" \ No newline at end of file +default = "60" \ No newline at end of file diff --git a/ballista/executor/src/bin/main.rs b/ballista/executor/src/bin/main.rs index a7ba8e36e..203481480 100644 --- a/ballista/executor/src/bin/main.rs +++ b/ballista/executor/src/bin/main.rs @@ -81,10 +81,6 @@ async fn main() -> Result<()> { grpc_server_max_decoding_message_size: opt.grpc_server_max_decoding_message_size, grpc_server_max_encoding_message_size: opt.grpc_server_max_encoding_message_size, executor_heartbeat_interval_seconds: opt.executor_heartbeat_interval_seconds, - data_cache_policy: opt.data_cache_policy, - cache_dir: opt.cache_dir, - cache_capacity: opt.cache_capacity, - cache_io_concurrency: opt.cache_io_concurrency, execution_engine: None, }; diff --git a/ballista/executor/src/executor_process.rs b/ballista/executor/src/executor_process.rs index 7bccaa3f8..93875cdd8 100644 --- a/ballista/executor/src/executor_process.rs +++ b/ballista/executor/src/executor_process.rs @@ -40,7 +40,7 @@ use uuid::Uuid; use datafusion::execution::runtime_env::{RuntimeConfig, RuntimeEnv}; use datafusion_proto::protobuf::{LogicalPlanNode, PhysicalPlanNode}; -use ballista_core::config::{DataCachePolicy, LogRotationPolicy, TaskSchedulingPolicy}; +use ballista_core::config::{LogRotationPolicy, TaskSchedulingPolicy}; use ballista_core::error::BallistaError; use ballista_core::object_store_registry::with_object_store_registry; use ballista_core::serde::protobuf::executor_resource::Resource; @@ -84,10 +84,6 @@ pub struct ExecutorProcessConfig { pub log_rotation_policy: LogRotationPolicy, pub job_data_ttl_seconds: u64, pub job_data_clean_up_interval_seconds: u64, - pub data_cache_policy: Option, - pub cache_dir: Option, - pub cache_capacity: u64, - pub cache_io_concurrency: u32, /// The maximum size of a decoded message at the grpc server side. pub grpc_server_max_decoding_message_size: u32, /// The maximum size of an encoded message at the grpc server side.