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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]