Skip to content

Apache DataFusion SQL Query Engine

Add option param for standalone mode (#42)

K.I. (Dennis) Junge86ad26a678a
diff --git a/ballista/rust/executor/executor_config_spec.toml b/ballista/rust/executor/executor_config_spec.toml
index cb47ca0642..f7c2f037a5 100644
--- a/ballista/rust/executor/executor_config_spec.toml
+++ b/ballista/rust/executor/executor_config_spec.toml
@@ -76,4 +76,9 @@ abbr = "c"
name = "concurrent_tasks"
type = "usize"
default = "4"
-doc = "Max concurrent tasks."
\ No newline at end of file
+doc = "Max concurrent tasks."
+
+[[param]]
+name = "scheduler_data_path"
+type = "String"
+doc = "Path for standalone data"
diff --git a/ballista/rust/executor/src/main.rs b/ballista/rust/executor/src/main.rs
index 2718ea3542..e620fa4503 100644
--- a/ballista/rust/executor/src/main.rs
+++ b/ballista/rust/executor/src/main.rs
@@ -107,8 +107,14 @@ async fn main() -> Result<()> {
if opt.local {
info!("Running in local mode. Scheduler will be run in-proc");
- let client = StandaloneClient::try_new_temporary()
- .context("Could not create standalone config backend")?;
+
+ let client = match opt.scheduler_data_path {
+ Some(v) => StandaloneClient::try_new(v)
+ .context("Could not create standalone config backend")?,
+ None => StandaloneClient::try_new_temporary()
+ .context("Could not create standalone config backend")?,
+ };
+
let server =
SchedulerGrpcServer::new(SchedulerServer::new(Arc::new(client), namespace));
let addr = format!("{}:{}", bind_host, scheduler_port);