pub struct Executor {
pub metadata: ExecutorRegistration,
pub work_dir: String,
pub scalar_functions: HashMap<String, Arc<ScalarUDF>>,
pub aggregate_functions: HashMap<String, Arc<AggregateUDF>>,
pub window_functions: HashMap<String, Arc<WindowUDF>>,
pub metrics_collector: Arc<dyn ExecutorMetricsCollector>,
pub concurrent_tasks: usize,
/* private fields */
}Expand description
kapot executor
Fields§
§metadata: ExecutorRegistrationMetadata
work_dir: StringDirectory for storing partial results
scalar_functions: HashMap<String, Arc<ScalarUDF>>Scalar functions that are registered in the Executor
aggregate_functions: HashMap<String, Arc<AggregateUDF>>Aggregate functions registered in the Executor
window_functions: HashMap<String, Arc<WindowUDF>>Window functions registered in the Executor
metrics_collector: Arc<dyn ExecutorMetricsCollector>Collector for runtime execution metrics
concurrent_tasks: usizeConcurrent tasks can run in executor
Implementations§
Source§impl Executor
impl Executor
Sourcepub fn new(
metadata: ExecutorRegistration,
work_dir: &str,
runtime: Arc<RuntimeEnv>,
runtime_with_data_cache: Option<Arc<RuntimeEnv>>,
metrics_collector: Arc<dyn ExecutorMetricsCollector>,
concurrent_tasks: usize,
execution_engine: Option<Arc<dyn ExecutionEngine>>,
) -> Self
pub fn new( metadata: ExecutorRegistration, work_dir: &str, runtime: Arc<RuntimeEnv>, runtime_with_data_cache: Option<Arc<RuntimeEnv>>, metrics_collector: Arc<dyn ExecutorMetricsCollector>, concurrent_tasks: usize, execution_engine: Option<Arc<dyn ExecutionEngine>>, ) -> Self
Create a new executor instance
Source§impl Executor
impl Executor
pub fn get_runtime(&self, data_cache: bool) -> Arc<RuntimeEnv>
Sourcepub async fn execute_query_stage(
&self,
task_id: usize,
partition: PartitionId,
query_stage_exec: Arc<dyn QueryStageExecutor>,
task_ctx: Arc<TaskContext>,
) -> Result<Vec<ShuffleWritePartition>, KapotError>
pub async fn execute_query_stage( &self, task_id: usize, partition: PartitionId, query_stage_exec: Arc<dyn QueryStageExecutor>, task_ctx: Arc<TaskContext>, ) -> Result<Vec<ShuffleWritePartition>, KapotError>
Execute one partition of a query stage and persist the result to disk in IPC format. On success, return a RecordBatch containing metadata about the results, including path and statistics.
pub async fn cancel_task( &self, task_id: usize, job_id: String, stage_id: usize, partition_id: usize, ) -> Result<bool, KapotError>
pub fn work_dir(&self) -> &str
pub fn active_task_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Executor
impl !RefUnwindSafe for Executor
impl Send for Executor
impl Sync for Executor
impl Unpin for Executor
impl !UnwindSafe for Executor
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
Mutably borrows from an owned value. Read more
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>
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 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>
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 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>
Wrap the input message
T in a tonic::Request