Skip to content

Commit

Permalink
define state monitor as a type
Browse files Browse the repository at this point in the history
Signed-off-by: remzi <[email protected]>
  • Loading branch information
HaoYang670 committed Jan 10, 2025
1 parent 4ff4281 commit 499621c
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 276 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ bash build rucat_state_monitor.sh
6. More resource clients: Yarn, Spark standalone, Spark local, rust shuttle etc.
7. expose spark rpc port and web ui port
8. Remove all unreachable code by using stronger type.
9. Define state monitor as a type.

## Debug

Expand Down
5 changes: 5 additions & 0 deletions rucat_state_monitor/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ pub struct StateMonitorConfig {
/// Time interval in second for checking engine state
pub check_interval_secs: u8,
/// Time interval in second for checking trigger state timeout
/// *Trigger* states are expected to exist only for a very short time,
/// and then be updated to *InProgress* or *Error* states. However, there is a possibility that
/// the state monitor is down when the engine is in *Trigger* state, so we need to set a timeout
/// to avoid the engine being stuck in *Trigger* state. State monitor will pick up those timed out engines
/// and retrigger them.
pub trigger_state_timeout_secs: u16,
pub database: DatabaseConfig,
}
Expand Down
Loading

0 comments on commit 499621c

Please sign in to comment.