Skip to main content

datafusion_dist/
config.rs

1use std::time::Duration;
2
3#[derive(Debug, derive_with::With)]
4pub struct DistConfig {
5    pub heartbeat_interval: Duration,
6    pub stage0_task_poll_timeout: Duration,
7    pub job_ttl: Duration,
8    pub job_ttl_check_interval: Duration,
9    pub event_queue_size: usize,
10}
11
12impl DistConfig {
13    pub fn new() -> Self {
14        Self {
15            heartbeat_interval: Duration::from_secs(20),
16            stage0_task_poll_timeout: Duration::from_secs(10),
17            job_ttl: Duration::from_secs(30 * 60),
18            job_ttl_check_interval: Duration::from_secs(5 * 60),
19            event_queue_size: 8 * 1024,
20        }
21    }
22}
23
24impl Default for DistConfig {
25    fn default() -> Self {
26        Self::new()
27    }
28}