pub struct StaticExecutionGraph { /* private fields */ }Expand description
ExecutionGraph implementation which generates all stages on job submission time
Implementations§
Source§impl StaticExecutionGraph
impl StaticExecutionGraph
Sourcepub fn new(
scheduler_id: &str,
job_id: &JobId,
job_name: &str,
session_id: &str,
plan: Arc<dyn ExecutionPlan>,
queued_at: u64,
session_config: Arc<SessionConfig>,
planner: &mut dyn DistributedPlanner,
logical_plan: Option<String>,
) -> Result<Self>
pub fn new( scheduler_id: &str, job_id: &JobId, job_name: &str, session_id: &str, plan: Arc<dyn ExecutionPlan>, queued_at: u64, session_config: Arc<SessionConfig>, planner: &mut dyn DistributedPlanner, logical_plan: Option<String>, ) -> Result<Self>
Creates a new ExecutionGraph from a physical execution plan.
This will use the DistributedPlanner to break the plan into stages
and build the DAG structure needed for distributed execution.
Trait Implementations§
Source§impl Clone for StaticExecutionGraph
impl Clone for StaticExecutionGraph
Source§fn clone(&self) -> StaticExecutionGraph
fn clone(&self) -> StaticExecutionGraph
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StaticExecutionGraph
impl Debug for StaticExecutionGraph
Source§impl ExecutionGraph for StaticExecutionGraph
impl ExecutionGraph for StaticExecutionGraph
Source§fn is_successful(&self) -> bool
fn is_successful(&self) -> bool
An ExecutionGraph is successful if all its stages are successful
Source§fn revive(&mut self) -> bool
fn revive(&mut self) -> bool
Revive the execution graph by converting the resolved stages to running stages If any stages are converted, return true; else false.
Source§fn update_task_status(
&mut self,
executor: &ExecutorMetadata,
task_statuses: Vec<TaskStatus>,
max_task_failures: usize,
max_stage_failures: usize,
) -> Result<Vec<QueryStageSchedulerEvent>>
fn update_task_status( &mut self, executor: &ExecutorMetadata, task_statuses: Vec<TaskStatus>, max_task_failures: usize, max_stage_failures: usize, ) -> Result<Vec<QueryStageSchedulerEvent>>
Update task statuses and task metrics in the graph. This will also push shuffle partitions to their respective shuffle read stages.
Source§fn running_stages(&self) -> Vec<usize>
fn running_stages(&self) -> Vec<usize>
Return all the currently running stage ids
Source§fn running_tasks(&self) -> Vec<RunningTaskInfo>
fn running_tasks(&self) -> Vec<RunningTaskInfo>
Return all currently running tasks along with the executor ID on which they are assigned
Source§fn available_tasks(&self) -> usize
fn available_tasks(&self) -> usize
Total number of tasks in this plan that are ready for scheduling
Source§fn reset_stages_on_lost_executor(
&mut self,
executor_id: &str,
) -> Result<(HashSet<usize>, Vec<RunningTaskInfo>)>
fn reset_stages_on_lost_executor( &mut self, executor_id: &str, ) -> Result<(HashSet<usize>, Vec<RunningTaskInfo>)>
Reset running and successful stages on a given executor This will first check the unresolved/resolved/running stages and reset the running tasks and successful tasks. Then it will check the successful stage and whether there are running parent stages need to read shuffle from it. If yes, reset the successful tasks and roll back the resolved shuffle recursively.
Returns the reset stage ids and running tasks should be killed
Source§fn resolve_stage(&mut self, stage_id: usize) -> Result<bool>
fn resolve_stage(&mut self, stage_id: usize) -> Result<bool>
Convert unresolved stage to be resolved
Source§fn succeed_stage(&mut self, stage_id: usize) -> bool
fn succeed_stage(&mut self, stage_id: usize) -> bool
Convert running stage to be successful
Source§fn fail_stage(&mut self, stage_id: usize, err_msg: String) -> bool
fn fail_stage(&mut self, stage_id: usize, err_msg: String) -> bool
Convert running stage to be failed
Source§fn rollback_running_stage(
&mut self,
stage_id: usize,
failure_reasons: HashSet<String>,
) -> Result<Vec<RunningTaskInfo>>
fn rollback_running_stage( &mut self, stage_id: usize, failure_reasons: HashSet<String>, ) -> Result<Vec<RunningTaskInfo>>
Convert running stage to be unresolved, Returns a Vec of RunningTaskInfo for running tasks in this stage.
Source§fn rollback_resolved_stage(&mut self, stage_id: usize) -> Result<bool>
fn rollback_resolved_stage(&mut self, stage_id: usize) -> Result<bool>
Convert resolved stage to be unresolved
Source§fn rerun_successful_stage(&mut self, stage_id: usize) -> bool
fn rerun_successful_stage(&mut self, stage_id: usize) -> bool
Convert successful stage to be running
Source§fn succeed_job(&mut self) -> Result<()>
fn succeed_job(&mut self) -> Result<()>
Mark the job success
Source§fn cloned(&self) -> ExecutionGraphBox
fn cloned(&self) -> ExecutionGraphBox
Source§fn session_id(&self) -> &str
fn session_id(&self) -> &str
Source§fn session_config(&self) -> Arc<SessionConfig> ⓘ
fn session_config(&self) -> Arc<SessionConfig> ⓘ
Source§fn logical_plan(&self) -> Option<&str>
fn logical_plan(&self) -> Option<&str>
Source§fn physical_plan(&self) -> Arc<dyn ExecutionPlan> ⓘ
fn physical_plan(&self) -> Arc<dyn ExecutionPlan> ⓘ
Source§fn start_time(&self) -> u64
fn start_time(&self) -> u64
Source§fn completed_stages(&self) -> usize
fn completed_stages(&self) -> usize
Source§fn fetch_running_stage(
&mut self,
black_list: &[usize],
) -> Option<(&mut RunningStage, &mut usize)>
fn fetch_running_stage( &mut self, black_list: &[usize], ) -> Option<(&mut RunningStage, &mut usize)>
Source§fn update_status(&mut self, status: JobStatus)
fn update_status(&mut self, status: JobStatus)
Source§fn output_locations(&self) -> Vec<PartitionLocation>
fn output_locations(&self) -> Vec<PartitionLocation>
Source§fn stage_count(&self) -> usize
fn stage_count(&self) -> usize
Source§fn abort_running(&mut self, error: String) -> Vec<RunningTaskInfo>
fn abort_running(&mut self, error: String) -> Vec<RunningTaskInfo>
Source§fn intermediate_stage_ids(&self) -> Vec<u32>
fn intermediate_stage_ids(&self) -> Vec<u32>
output_links is non-empty. The final stage(s) are excluded.Auto Trait Implementations§
impl !RefUnwindSafe for StaticExecutionGraph
impl !UnwindSafe for StaticExecutionGraph
impl Freeze for StaticExecutionGraph
impl Send for StaticExecutionGraph
impl Sync for StaticExecutionGraph
impl Unpin for StaticExecutionGraph
impl UnsafeUnpin for StaticExecutionGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request