mingmwang commented on code in PR #667:
URL: https://github.com/apache/arrow-ballista/pull/667#discussion_r1121093460
##########
ballista/scheduler/src/state/executor_manager.rs:
##########
@@ -614,27 +623,62 @@ impl ExecutorManager {
.iter()
.filter_map(|pair| {
let (exec, heartbeat) = pair.pair();
- (heartbeat.timestamp > last_seen_ts_threshold).then(||
exec.clone())
+
+ let active = matches!(
+ heartbeat
+ .status
+ .as_ref()
+ .and_then(|status| status.status.as_ref()),
+ Some(executor_status::Status::Active(_))
+ );
+ let live = heartbeat.timestamp > last_seen_ts_threshold;
+
+ (active && live).then(|| exec.clone())
})
Review Comment:
This method's comment need to be changed to reflect the new logic.
```rust
/// Retrieve the set of all executor IDs where the executor has been
observed in the last
/// `last_seen_ts_threshold` seconds.
pub(crate) fn get_alive_executors(
&self,
last_seen_ts_threshold: u64,
)
```
--
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]