Trait BatchTaskContext

Source
pub trait BatchTaskContext:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn get_task_output( &self, task_output_id: TaskOutputId, ) -> Result<TaskOutput>; fn catalog_reader(&self) -> SysCatalogReaderRef; fn is_local_addr(&self, peer_addr: &HostAddr) -> bool; fn dml_manager(&self) -> DmlManagerRef; fn state_store(&self) -> StateStoreImpl; fn batch_metrics(&self) -> Option<BatchMetrics>; fn spill_metrics(&self) -> Arc<BatchSpillMetrics>; fn client_pool(&self) -> ComputeClientPoolRef; 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<WorkerNodeManagerRef>; 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§

Source

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

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.

Source

fn catalog_reader(&self) -> SysCatalogReaderRef

Get system catalog reader, used to read system table.

Source

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

Whether peer_addr is in same as current task.

Source

fn dml_manager(&self) -> DmlManagerRef

Source

fn state_store(&self) -> StateStoreImpl

Source

fn batch_metrics(&self) -> Option<BatchMetrics>

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

Source

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

Source

fn client_pool(&self) -> ComputeClientPoolRef

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

Source

fn get_config(&self) -> &BatchConfig

Get config for batch environment

Source

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

Source

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

Source

fn worker_node_manager(&self) -> Option<WorkerNodeManagerRef>

Source

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

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

Implementors§