@@ -20,7 +20,7 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH};
20
20
21
21
use ballista_core:: error:: Result ;
22
22
use ballista_core:: event_loop:: { EventLoop , EventSender } ;
23
- use ballista_core:: serde:: protobuf:: { StopExecutorParams , TaskStatus } ;
23
+ use ballista_core:: serde:: protobuf:: { JobStatus , StopExecutorParams , TaskStatus } ;
24
24
use ballista_core:: serde:: { AsExecutionPlan , BallistaCodec } ;
25
25
use ballista_core:: utils:: default_session_builder;
26
26
@@ -171,15 +171,11 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerServer<T
171
171
Ok ( ( ) )
172
172
}
173
173
174
- pub ( crate ) fn pending_tasks ( & self ) -> usize {
174
+ pub fn pending_tasks ( & self ) -> usize {
175
175
self . query_stage_scheduler . pending_tasks ( )
176
176
}
177
177
178
- pub ( crate ) fn metrics_collector ( & self ) -> & dyn SchedulerMetricsCollector {
179
- self . query_stage_scheduler . metrics_collector ( )
180
- }
181
-
182
- pub ( crate ) async fn submit_job (
178
+ pub async fn submit_job (
183
179
& self ,
184
180
job_id : & str ,
185
181
job_name : & str ,
@@ -198,6 +194,14 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerServer<T
198
194
. await
199
195
}
200
196
197
+ pub async fn get_active_job_status ( & self , job_id : & str ) -> Result < Option < JobStatus > > {
198
+ self . state . task_manager . get_job_status ( job_id) . await
199
+ }
200
+
201
+ pub ( crate ) fn metrics_collector ( & self ) -> & dyn SchedulerMetricsCollector {
202
+ self . query_stage_scheduler . metrics_collector ( )
203
+ }
204
+
201
205
/// It just send task status update event to the channel,
202
206
/// and will not guarantee the event processing completed after return
203
207
pub ( crate ) async fn update_task_status (
0 commit comments