milenkovicm commented on code in PR #1698:
URL:
https://github.com/apache/datafusion-ballista/pull/1698#discussion_r3262633320
##########
ballista/scheduler/src/state/task_manager.rs:
##########
@@ -270,6 +270,17 @@ impl<T: 'static + AsLogicalPlan, U: 'static +
AsExecutionPlan> TaskManager<T, U>
self.active_job_cache.len()
}
+ /// Get the total number of pending tasks across all active jobs.
+ pub async fn pending_task_number(&self) -> usize {
Review Comment:
I don't like that we iterate through all jobs all the time to calculate
pending task numbers
##########
ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs:
##########
@@ -358,6 +371,13 @@ impl<T: 'static + AsLogicalPlan, U: 'static +
AsExecutionPlan>
);
}
}
+
+ if update_pending_tasks_metric {
Review Comment:
In which case would we use this metrics? If this number is 200 or 2000
current what does it say to observer? How can I interpret it?
Could we use scheduling task latency metric instead? Like a 1min 5min
10min moving average of it?
I'm not sure but task update even may have it (to be confirmed) so we could
build that metric without iterating through all the active jobs
This is just an idea for discussion
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]