Skip to main content

BatchTaskContext

Trait BatchTaskContext 

pub trait BatchTaskContext:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn get_task_output( &self, task_output_id: TaskOutputId, ) -> Result<TaskOutput, BatchError>; fn catalog_reader(&self) -> Arc<dyn SysCatalogReader> ⓘ; fn is_local_addr(&self, peer_addr: &HostAddr) -> bool; fn dml_manager(&self) -> Arc<DmlManager> ⓘ; fn state_store(&self) -> StateStoreImpl; fn batch_metrics(&self) -> Option<Arc<BatchMetricsInner>>; fn spill_metrics(&self) -> Arc<BatchSpillMetrics> ⓘ; fn client_pool(&self) -> Arc<RpcClientPool<ComputeClient>> ⓘ; fn get_config(&self) -> &BatchConfig; fn source_metrics(&self) -> Arc<SourceMetrics> ⓘ; fn create_executor_mem_context(&self, executor_id: &str) -> MemoryContext; fn worker_node_manager(&self) -> Option<Arc<WorkerNodeManager>>; fn metrics_reader(&self) -> Arc<dyn MetricsReader> ⓘ;
}
Expand description

Context for batch task execution.

This context is specific to one task execution, and should not be shared by different tasks.

Required Methods§

fn get_task_output( &self, task_output_id: TaskOutputId, ) -> Result<TaskOutput, BatchError>

Get task output identified by task_output_id.

Returns error if the task of task_output_id doesn’t run in same worker as current task.

fn catalog_reader(&self) -> Arc<dyn SysCatalogReader> ⓘ

Get system catalog reader, used to read system table.

fn is_local_addr(&self, peer_addr: &HostAddr) -> bool

Whether peer_addr is in same as current task.

fn dml_manager(&self) -> Arc<DmlManager> ⓘ

fn state_store(&self) -> StateStoreImpl

fn batch_metrics(&self) -> Option<Arc<BatchMetricsInner>>

Get batch metrics. None indicates that not collect task metrics.

fn spill_metrics(&self) -> Arc<BatchSpillMetrics> ⓘ

fn client_pool(&self) -> Arc<RpcClientPool<ComputeClient>> ⓘ

Get compute client pool. This is used in grpc exchange to avoid creating new compute client for each grpc call.

fn get_config(&self) -> &BatchConfig

Get config for batch environment

fn source_metrics(&self) -> Arc<SourceMetrics> ⓘ

fn create_executor_mem_context(&self, executor_id: &str) -> MemoryContext

fn worker_node_manager(&self) -> Option<Arc<WorkerNodeManager>>

fn metrics_reader(&self) -> Arc<dyn MetricsReader> ⓘ

Get metrics reader for reading channel delta stats and other metrics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§