Skip to main content

Crate datafusion_distributed

Crate datafusion_distributed 

Source

Modules§

grpc

Structs§

AvgLatencyMetric
BroadcastExec
ExecutionPlan that scales up partitions for network broadcasting.
BytesCounterMetric
A cumulative counter metric for tracking byte counts.
CompressionType
DefaultSessionBuilder
Noop implementation of the WorkerSessionBuilder. Used by default if no WorkerSessionBuilder is provided while building the Worker.
DesiredTaskCountEvent
Information supplied when the planner asks a handler for a node’s desired task count.
DesiredTaskCountEventResponse
Result of running a [TaskEstimator] on a leaf node. It tells the distributed planner hints about how many tasks should be used in [Stage]s that contain leaf nodes.
DistributedCodec
DataFusion PhysicalExtensionCodec implementation that allows serializing and deserializing the custom ExecutionPlans in this project
DistributedConfig
Configuration for the distributed planner.
DistributedExec
ExecutionPlan that executes the inner plan in distributed mode. Before executing it, two modifications are lazily performed on the plan:
DistributedLeafExec
Represents a leaf node ready to be distributed across N tasks, where the variant of the node belonging to each task is stored in a Vec of N positions.
DistributedTaskContext
DistributedWorkUnitFeedContext
Provides contextual information about where a WorkUnitFeedProvider is being executed. When using WorkUnitFeedProvider in distributed queries, it might be getting executed in the coordinating stage, or it might be getting executed just locally because the query did not need any remote execution.
ExecuteTaskRequest
FirstLatencyMetric
A latency metric that captures only the first recorded value, ignoring all subsequent ones. Uses 0 as the unset sentinel (valid durations are clamped to at least 1 nanosecond).
GetWorkerInfoRequest
GetWorkerInfoResponse
LoadInfo
LocalWorkerContext
Context injected to the datafusion::prelude::SessionConfig extensions that provides information about the presence of a Worker locally.
MappedWorkerSessionBuilder
MaxGaugeMetric
Similar to DataFusion’s Gauge metric, but aggregates between instances using max instead of sum.
MaxLatencyMetric
MinLatencyMetric
NetworkBroadcastExec
Network boundary for broadcasting data to all consumer tasks.
NetworkCoalesceExec
ExecutionPlan that coalesces partitions from multiple tasks into a one or more task without performing any repartition, and maintaining the same partitioning scheme.
NetworkShuffleExec
ExecutionPlan implementation that shuffles data across the network in a distributed context.
P50LatencyMetric
P75LatencyMetric
P95LatencyMetric
P99LatencyMetric
RouteTasksEvent
Information supplied when the coordinator assigns a stage’s tasks to workers.
RouteTasksEventResponse
Worker assignments returned by a RouteTasksHandler.
ScaleUpLeafNodeEvent
Information supplied when a leaf has been assigned its final stage task count.
ScaleUpLeafNodeEventResponse
A replacement plan returned by a ScaleUpLeafNodeHandler.
SetPlanRequest
TaskData
TaskData stores state for a single task being executed by this Endpoint. It may be shared by concurrent requests for the same task which execute separate partitions.
TaskKey
TaskMetrics
WorkUnitBatch
WorkUnitFeed
The WorkUnitFeed is created with a user-provided WorkUnitFeedProvider and is embedded in any custom datafusion::physical_plan::ExecutionPlan implementation as a field.
WorkUnitFeedDeclaration
WorkUnitFeedProto
WorkUnitMsg
Worker
WorkerPlanRewriteEvent
Information supplied while rewriting a decoded worker stage plan before registration.
WorkerPlanRewriteEventResponse
The worker-local plan produced by a WorkerPlanRewriteHandler.
WorkerQueryContext

Enums§

CoordinatorToWorkerMsg
DistributedMetricsFormat
Format to use when displaying metrics for a distributed plan.
MaybeEncoded
A value that a transport may either leave encoded or materialize in memory. Users are free to pass MaybeEncoded::Encoded or MaybeEncoded::Decoded at any moment and Distributed DataFusion’s code will internally know how to handle it.
ProducerHead
Defines what shape should the head node of a stage have upon getting executed. Depending on the NetworkBoundary implementation, the stage below should have different head nodes.
Stage
A unit of isolation for a portion of a physical execution plan that can be executed independently and across a network boundary. It implements ExecutionPlan and can be executed to produce a stream of record batches.
TaskCountAnnotation
Annotation attached to a single ExecutionPlan that determines how many distributed tasks it should run on.
WorkerToCoordinatorMsg

Constants§

DISTRIBUTED_DATAFUSION_TASK_ID_LABEL
Label used to annotate metrics in execution plan nodes with the task in which they were executed. Note that the same task id may be used in multiple stages.

Traits§

BytesMetricExt
Extension trait for DataFusion’s metric system that adds support for byte count metrics that display using human-readable byte sizes (KB, MB, GB) instead of plain count notation.
ChannelResolver
Allows users to customize the way Worker clients are created. A common use case is to wrap the client with tower layers or schedule it in an IO-specific tokio runtime.
DesiredTaskCountHandler
DistributedExt
Extends DataFusion with distributed capabilities.
DistributedGetterExt
Trait to have a unified interface for getting structs & properties from SessionConfig that are used in distributed context.
GaugeMetricExt
Extension trait for DataFusion’s metric system that adds support for a Gauge metric that aggregates to others using max instead of sum
LatencyMetricExt
Extension trait for DataFusion’s metric system that adds support for latency related metrics.
MappedWorkerSessionBuilderExt
NetworkBoundary
This trait represents a node that introduces the necessity of a network boundary in the plan. The distributed planner, upon stepping into one of these, will break the plan and build a stage out of it.
NetworkBoundaryExt
Extension trait for downcasting dynamic types to NetworkBoundary.
RouteTasksHandler
Optionally assigns a stage’s task slots to worker URLs.
ScaleUpLeafNodeHandler
Handles optional leaf rewrites after a stage’s task count is final.
SessionStateBuilderExt
Extension trait for SessionStateBuilder.
WorkUnit
A WorkUnit is a single unit of runtime metadata produced by a crate::WorkUnitFeedProvider and consumed by a leaf datafusion::physical_plan::ExecutionPlan via an embedded crate::WorkUnitFeed.
WorkUnitFeedProvider
Extension point for building user-defined work unit streams consumed by a crate::WorkUnitFeed embedded in a leaf datafusion::physical_plan::ExecutionPlan.
WorkerChannel
Abstraction over the specific transport protocol implementation.
WorkerPlanRewriteHandler
Rewrites a decoded worker-local plan before it is registered for execution.
WorkerResolver
Resolves a list of worker URLs in the cluster available for executing parts of the plan.
WorkerSessionBuilder
builds a DataFusion’s SessionState in each query issued to a worker.

Functions§

display_plan_ascii
display_plan_graphviz
This will render a regular or distributed datafusion plan as Graphviz dot format. You can view them on https://vis-js.com
explain_analyze
explain_analyze renders an ExecutionPlan with metrics.
get_distributed_channel_resolver
get_distributed_worker_resolver
Gets the WorkerResolver from the SessionConfig’s extensions. Typically called inside [RouteTasksHandler::route_tasks] to resolve the worker URLs available for distributed tasks.
rewrite_distributed_plan_with_metrics
Rewrites a distributed plan with metrics. Does nothing if the root node is not a DistributedExec. Returns an error if the distributed plan was not executed.