Skip to content

Commit

Permalink
delete cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Jan 1, 2024
1 parent a1e066c commit 3106203
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 53 deletions.
Empty file removed .gitmodules
Empty file.
21 changes: 0 additions & 21 deletions ballista/core/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self, Self::Err> {
ArgEnum::from_str(s, true)
}
}

impl parse_arg::ParseArgFromStr for DataCachePolicy {
fn describe_type<W: fmt::Write>(mut writer: W) -> fmt::Result {
write!(writer, "The data cache policy")
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
24 changes: 1 addition & 23 deletions ballista/executor/executor_config_spec.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
default = "60"
4 changes: 0 additions & 4 deletions ballista/executor/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
6 changes: 1 addition & 5 deletions ballista/executor/src/executor_process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<DataCachePolicy>,
pub cache_dir: Option<String>,
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.
Expand Down

0 comments on commit 3106203

Please sign in to comment.