Skip to main content

StaticExecutionGraph

Struct StaticExecutionGraph 

Source
pub struct StaticExecutionGraph { /* private fields */ }
Expand description

ExecutionGraph implementation which generates all stages on job submission time

Implementations§

Source§

impl StaticExecutionGraph

Source

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

Source§

fn clone(&self) -> StaticExecutionGraph

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StaticExecutionGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ExecutionGraph for StaticExecutionGraph

Source§

fn is_successful(&self) -> bool

An ExecutionGraph is successful if all its stages are successful

Source§

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

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>

Return all the currently running stage ids

Source§

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

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

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>

Convert unresolved stage to be resolved

Source§

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

Convert running stage to be failed

Source§

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>

Convert resolved stage to be unresolved

Source§

fn rerun_successful_stage(&mut self, stage_id: usize) -> bool

Convert successful stage to be running

Source§

fn fail_job(&mut self, error: String)

fail job with error message

Source§

fn succeed_job(&mut self) -> Result<()>

Mark the job success

Source§

fn cloned(&self) -> ExecutionGraphBox

Clones execution graph
Source§

fn job_id(&self) -> &JobId

Returns the job ID for this execution graph.
Source§

fn job_name(&self) -> &str

Returns the job name for this execution graph.
Source§

fn session_id(&self) -> &str

Returns the session ID associated with this job.
Source§

fn session_config(&self) -> Arc<SessionConfig>

Returns the session config associated with this job.
Source§

fn status(&self) -> &JobStatus

Returns the current status of the job.
Source§

fn logical_plan(&self) -> Option<&str>

Returns the logical plan as a string, if captured at submission time.
Source§

fn physical_plan(&self) -> Arc<dyn ExecutionPlan>

Returns the physical plan as a string, if captured at submission time.
Source§

fn start_time(&self) -> u64

Returns the timestamp when this job started execution.
Source§

fn end_time(&self) -> u64

Returns the timestamp when this job started execution.
Source§

fn completed_stages(&self) -> usize

Number of completed stages
Source§

fn fetch_running_stage( &mut self, black_list: &[usize], ) -> Option<(&mut RunningStage, &mut usize)>

Fetches a running stage that has available tasks, excluding stages in the blacklist. Read more
Source§

fn update_status(&mut self, status: JobStatus)

Updates the job status.
Source§

fn output_locations(&self) -> Vec<PartitionLocation>

Returns the output partition locations for the final stage results.
Source§

fn stages(&self) -> &HashMap<usize, ExecutionStage>

Exposes executions stages and stage id’s
Source§

fn stage_count(&self) -> usize

Returns the total number of stages in this execution graph.
Source§

fn abort_running(&mut self, error: String) -> Vec<RunningTaskInfo>

Abort a running job: fail it, transition every running stage to Failed, and return the in-flight tasks that should be cancelled. Used for both the failure and cancellation teardown paths.
Source§

fn intermediate_stage_ids(&self) -> Vec<u32>

Stage ids of all non-final (intermediate) stages — those whose output_links is non-empty. The final stage(s) are excluded.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more