milenkovicm commented on code in PR #1703:
URL:
https://github.com/apache/datafusion-ballista/pull/1703#discussion_r3252765837
##########
ballista/scheduler/src/state/task_manager.rs:
##########
@@ -366,6 +371,50 @@ impl<T: 'static + AsLogicalPlan, U: 'static +
AsExecutionPlan> TaskManager<T, U>
Ok(jobs)
}
+ /// Get all job ids including running, queued, and completed/failed jobs
+ pub async fn get_all_jobs(&self) -> Result<Vec<JobOverview>> {
+ self.get_all_jobs_with_status(None).await
+ }
+
+ /// Get all jobs optionally filtered by status.
+ /// When `status` is None, returns all jobs regardless of status.
+ pub async fn get_all_jobs_with_status(
Review Comment:
Can we make this function get all jobs and remove status as not used ?
##########
ballista/scheduler/src/state/task_manager.rs:
##########
@@ -346,7 +346,12 @@ impl<T: 'static + AsLogicalPlan, U: 'static +
AsExecutionPlan> TaskManager<T, U>
Arc::new(ret)
}
- /// Get a list of active job ids
+ /// Get a list of jobs from the active cache only (running and queued
jobs).
+ ///
+ /// Unlike [`Self::get_all_jobs`], this does not include completed or
failed jobs
+ /// that have been evicted from the cache. Prefer [`Self::get_all_jobs`]
for a
+ /// complete view.
+ #[deprecated(note = "Use get_all_jobs or get_all_jobs_with_status
instead")]
Review Comment:
No need to deprecate it just now,
--
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]