You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/28 13:04:31 UTC

[GitHub] [arrow-ballista] yahoNanJing opened a new pull request, #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

yahoNanJing opened a new pull request, #472:
URL: https://github.com/apache/arrow-ballista/pull/472

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #469.
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1008968306


##########
ballista/core/src/config/query.rs:
##########
@@ -0,0 +1,204 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+//! Ballista query configuration
+
+use crate::config::{ConfigEntry, ValidConfiguration, ValidConfigurationBuilder};
+use crate::error::Result;
+use datafusion::arrow::datatypes::DataType;
+use std::collections::HashMap;
+
+pub const BALLISTA_JOB_NAME: &str = "ballista.job.name";
+pub const BALLISTA_DEFAULT_SHUFFLE_PARTITIONS: &str = "ballista.shuffle.partitions";
+pub const BALLISTA_DEFAULT_BATCH_SIZE: &str = "ballista.batch.size";
+pub const BALLISTA_REPARTITION_JOINS: &str = "ballista.repartition.joins";
+pub const BALLISTA_REPARTITION_AGGREGATIONS: &str = "ballista.repartition.aggregations";
+pub const BALLISTA_REPARTITION_WINDOWS: &str = "ballista.repartition.windows";
+pub const BALLISTA_PARQUET_PRUNING: &str = "ballista.parquet.pruning";
+pub const BALLISTA_WITH_INFORMATION_SCHEMA: &str = "ballista.with_information_schema";
+/// give a plugin files dir, and then the dynamic library files in this dir will be load when scheduler state init.
+pub const BALLISTA_PLUGIN_DIR: &str = "ballista.plugin_dir";
+
+/// Ballista configuration, mainly for the query
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct BallistaConfig {

Review Comment:
   The existing configurations seem to be all related to the query execution, which may be used by both the scheduler and executor. The reason to add the query namespace is to distinguish it from the new added SchedulerConfig, since the name `BallistaConfig` may be too general and may give users wrong impression that it includes the SchedulerConfig.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] avantgardnerio commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
avantgardnerio commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1008605476


##########
ballista/core/src/config.rs:
##########
@@ -59,68 +58,51 @@ impl ConfigEntry {
         Self {
             name,
             _description,
-            _data_type,
+            data_type: _data_type,
             default_value,
         }
     }
 }
 
-/// Ballista configuration builder
-pub struct BallistaConfigBuilder {
-    settings: HashMap<String, String>,

Review Comment:
   Oh, it looks like this was already a HashMap based thing. I guess this PR is refactoring that pattern?



##########
ballista/core/src/config/query.rs:
##########
@@ -0,0 +1,204 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+//! Ballista query configuration
+
+use crate::config::{ConfigEntry, ValidConfiguration, ValidConfigurationBuilder};
+use crate::error::Result;
+use datafusion::arrow::datatypes::DataType;
+use std::collections::HashMap;
+
+pub const BALLISTA_JOB_NAME: &str = "ballista.job.name";
+pub const BALLISTA_DEFAULT_SHUFFLE_PARTITIONS: &str = "ballista.shuffle.partitions";
+pub const BALLISTA_DEFAULT_BATCH_SIZE: &str = "ballista.batch.size";
+pub const BALLISTA_REPARTITION_JOINS: &str = "ballista.repartition.joins";
+pub const BALLISTA_REPARTITION_AGGREGATIONS: &str = "ballista.repartition.aggregations";
+pub const BALLISTA_REPARTITION_WINDOWS: &str = "ballista.repartition.windows";
+pub const BALLISTA_PARQUET_PRUNING: &str = "ballista.parquet.pruning";
+pub const BALLISTA_WITH_INFORMATION_SCHEMA: &str = "ballista.with_information_schema";
+/// give a plugin files dir, and then the dynamic library files in this dir will be load when scheduler state init.
+pub const BALLISTA_PLUGIN_DIR: &str = "ballista.plugin_dir";
+
+/// Ballista configuration, mainly for the query
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct BallistaConfig {
+    /// Settings stored in map for easy serde
+    valid_config: ValidConfiguration,
+}
+
+impl BallistaConfig {
+    /// Create a configuration builder
+    pub fn builder() -> BallistaConfigBuilder {

Review Comment:
   This is more of a philosophical nit: I don't love the builder patterns that are propagating through the codebase. AFAICT, builders came from Java and were built on nullability and mutable state, due to the fact that it didn't have a [using statement](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-statement) or a [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax).
   
   In Rust we have the [equivalent of spread](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax), so I think we could just do:
   
   ```
   let my_config = {
     param_a,
     param_b,
     .. ValidConfig
   };
   ```
   
   To accomplish the same thing in a much more concise manner.



##########
ballista/core/src/config.rs:
##########
@@ -154,113 +191,27 @@ impl BallistaConfig {
 
         Ok(())
     }
+}
 
-    /// All available configuration options
-    pub fn valid_entries() -> HashMap<String, ConfigEntry> {

Review Comment:
   I feel like it would make more sense to just serde this once from untyped things like env vars into a typed struct and use that everywhere. A quick googling reveals: https://github.com/softprops/envy



##########
ballista/scheduler/src/main.rs:
##########
@@ -74,7 +79,7 @@ async fn start_server(
     addr: SocketAddr,
     scheduling_policy: TaskSchedulingPolicy,
     slots_policy: SlotsPolicy,
-    event_loop_buffer_size: usize,

Review Comment:
   This looks like the actual goal of the PR?
   
   1. To aid in PR review, I think it can really help if the author comments on a few of their own lines of code to highlight things like this
   2. @daltonmadolin I think you're currently working on the same thing, PTAL
   3. If merging this PR makes things no worse, and fixes the 8 arguments clippy issue, I'm fine with it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1295705780

   Thanks @avantgardnerio for your comment. I'll learn about  https://github.com/softprops/envy later. For the concern of using `HashMap`, I think we can raise another issue or PR if serde is better. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] andygrove commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
andygrove commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1297446391

   @yahoNanJing I don't see any updates in the user guide page that covers configuration. I think it would make the review easier if I can see the new docs explaining how to use these configs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] andygrove merged pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1298988231

   Hi @andygrove, the scheduler config just be added to the user guide.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1010980701


##########
ballista/scheduler/src/main.rs:
##########
@@ -250,15 +254,34 @@ async fn main() -> Result<()> {
 
     let scheduling_policy: TaskSchedulingPolicy = opt.scheduler_policy;
     let slots_policy: SlotsPolicy = opt.executor_slots_policy;
-    let event_loop_buffer_size = opt.event_loop_buffer_size as usize;
+    let mut config_builder = SchedulerConfigBuilder::default()
+        .set(
+            BALLISTA_SCHEDULER_EVENT_LOOP_BUFFER_SIZE,
+            &opt.event_loop_buffer_size.to_string(),
+        )
+        .set(
+            BALLISTA_FINISHED_JOB_DATA_CLEANUP_DELAY_SECS,
+            &opt.finished_job_data_clean_up_interval_seconds.to_string(),
+        )
+        .set(
+            BALLISTA_FINISHED_JOB_STATE_CLEANUP_DELAY_SECS,
+            &opt.finished_job_state_clean_up_interval_seconds.to_string(),
+        );

Review Comment:
   I don't understand the intention here of creating key-value pairs for these configs. It looks like these configs are just command-line arguments to the scheduler and there is no need to serialize them or send them over the network?
   
   Shouldn't the scheduler config just be a simple struct like this?
   
   ```rust
   struct SchedulerConfig {
     event_loop_buffer_size: ...,
     finished_job_data_clean_up_interval_seconds: ...,
     ...
     }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1011096741


##########
ballista/scheduler/src/main.rs:
##########
@@ -250,15 +254,34 @@ async fn main() -> Result<()> {
 
     let scheduling_policy: TaskSchedulingPolicy = opt.scheduler_policy;
     let slots_policy: SlotsPolicy = opt.executor_slots_policy;
-    let event_loop_buffer_size = opt.event_loop_buffer_size as usize;
+    let mut config_builder = SchedulerConfigBuilder::default()
+        .set(
+            BALLISTA_SCHEDULER_EVENT_LOOP_BUFFER_SIZE,
+            &opt.event_loop_buffer_size.to_string(),
+        )
+        .set(
+            BALLISTA_FINISHED_JOB_DATA_CLEANUP_DELAY_SECS,
+            &opt.finished_job_data_clean_up_interval_seconds.to_string(),
+        )
+        .set(
+            BALLISTA_FINISHED_JOB_STATE_CLEANUP_DELAY_SECS,
+            &opt.finished_job_state_clean_up_interval_seconds.to_string(),
+        );

Review Comment:
   Thanks @andygrove for your comments. Agree with you. It's a bit over designed. I'll change it back and use a normal struct to indicate the scheduler config.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1297332944

   Hi @andygrove, do you have any more concerns?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1298967648

   Hi @andygrove, just add the scheduler configurations to the user guide.
   
   Hi @avantgardnerio and @DaltonModlin, with the current configuration refactoring, just add the advertise_endpoint to the scheduler config. Could you help review the related changes?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1299494139

   > Does this turn the command line argument into `--advertise-flight-result-route-endpoint`? That seems overly verbose for a command line argument name. `--help` will show the full description. I think we could safely get away with `--advertise-flight-endpoint` at most.
   
   Hi @avantgardnerio, is it only for the result or both the result and the intermediate shuffle data? If it's only for the result, it's better to include 'result' in the configuration name. How about `advertise-flight-result-endpoint`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] avantgardnerio commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
avantgardnerio commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1300556297

   > advertise-flight-result-endpoint
   
   How about `--advertise-flightsql-endpoint`, which should remove any ambiguity as this is only related to FlightSQL, not regular flights between clients?
   
   A tangent not for this PR: we probably just want separate `--advertise-host` and `--flightsql-port` at some point, as I imagine other services may eventually need to know what host is listening. And now that I think about it, we shouldn't need the port to be specified as that shouldn't get remapped by anything.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1300699247

   > --advertise-flightsql-endpoint
   
   Seems good to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1010813058


##########
docs/source/user-guide/configs.md:
##########
@@ -58,3 +60,24 @@ In addition to Ballista-specific configuration settings, the following DataFusio
 | datafusion.explain.physical_plan_only           | Boolean | false   | When set to true, the explain statement will only print physical plans.                                                                                                                                                                                                                                                                                       |
 | datafusion.optimizer.filter_null_join_keys      | Boolean | false   | When set to true, the optimizer will insert filters before a join between a nullable and non-nullable column to filter out nulls on the nullable side. This filter can add additional overhead when the file format does not fully support predicate push down.                                                                                               |
 | datafusion.optimizer.skip_failed_rules          | Boolean | true    | When set to true, the logical plan optimizer will produce warning messages if any optimization rules produce errors and then proceed to the next rule. When set to false, any rules that produce errors will cause the query to fail.                                                                                                                         |
+
+## Ballista Scheduler Configuration Settings
+
+Besides the BallistaContext configuration settings, a few configuration settings for the Ballista scheduler to better
+manage the whole cluster are also needed to be taken care of.
+
+_Example: Specifying configuration options when starting the scheduler_
+
+```shell
+./ballista-scheduler --scheduler-policy push-staged --event-loop-buffer-size 1000000 --executor-slots-policy
+round-robin-local
+```
+
+| key                                            | type      | default      | description                                                                                                                                                                      |
+|------------------------------------------------|-----------|--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| scheduler_policy                               | Utf8      | pull-staged  | Sets the scheduing policy for the scheduler, possible values: pull-staged, push-staged.                                                                                          |

Review Comment:
   The table is using underscore (`scheduler_policy`) but the example shell command is using hyphen (`scheduler-policy`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] andygrove commented on a diff in pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#discussion_r1008894695


##########
ballista/core/src/config/query.rs:
##########
@@ -0,0 +1,204 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+//! Ballista query configuration
+
+use crate::config::{ConfigEntry, ValidConfiguration, ValidConfigurationBuilder};
+use crate::error::Result;
+use datafusion::arrow::datatypes::DataType;
+use std::collections::HashMap;
+
+pub const BALLISTA_JOB_NAME: &str = "ballista.job.name";
+pub const BALLISTA_DEFAULT_SHUFFLE_PARTITIONS: &str = "ballista.shuffle.partitions";
+pub const BALLISTA_DEFAULT_BATCH_SIZE: &str = "ballista.batch.size";
+pub const BALLISTA_REPARTITION_JOINS: &str = "ballista.repartition.joins";
+pub const BALLISTA_REPARTITION_AGGREGATIONS: &str = "ballista.repartition.aggregations";
+pub const BALLISTA_REPARTITION_WINDOWS: &str = "ballista.repartition.windows";
+pub const BALLISTA_PARQUET_PRUNING: &str = "ballista.parquet.pruning";
+pub const BALLISTA_WITH_INFORMATION_SCHEMA: &str = "ballista.with_information_schema";
+/// give a plugin files dir, and then the dynamic library files in this dir will be load when scheduler state init.
+pub const BALLISTA_PLUGIN_DIR: &str = "ballista.plugin_dir";
+
+/// Ballista configuration, mainly for the query
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct BallistaConfig {

Review Comment:
   What is the intent of moving the configs into a `query` namespace? Not all configs will be related to the execution of a single query.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-ballista] yahoNanJing commented on pull request #472: Add SchedulerConfig for the scheduler configurations, like event_loop_buffer_size, finished_job_data_clean_up_interval_seconds, finished_job_state_clean_up_interval_seconds

Posted by GitBox <gi...@apache.org>.
yahoNanJing commented on PR #472:
URL: https://github.com/apache/arrow-ballista/pull/472#issuecomment-1294980028

   Hi @andygrove, @Dandandan, @avantgardnerio, could you help review this PR which refactors the scheduler configurations so that we can add more scheduler related configurations easily in the future?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org