killzoner commented on code in PR #1698:
URL: 
https://github.com/apache/datafusion-ballista/pull/1698#discussion_r3237192327


##########
ballista/scheduler/src/state/task_manager.rs:
##########
@@ -270,6 +270,16 @@ 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 {
+        let mut count = 0;
+        for pair in self.active_job_cache.iter() {
+            let graph = pair.value().execution_graph.read().await;

Review Comment:
   Thanks ! I'm not very used to `dashmap`, this makes sense



-- 
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]

Reply via email to