Skip to main content

Crate ballista_executor

Crate ballista_executor 

Source
Expand description

§Ballista Executor

The executor process for the Ballista distributed query engine, and the library behind it. Executors register with a scheduler, run the tasks it assigns, write shuffle output to local storage, and serve those partitions over Arrow Flight.

§Running

cargo install --locked ballista-executor
RUST_LOG=info ballista-executor --vcores 4

Each executor binds three ports: Arrow Flight on --bind-port (50051), gRPC on --bind-grpc-port (50052), and HTTP health on --bind-health-port (50053). Running a second executor on one host means moving all three.

--vcores sets how many partitions the executor runs at once, defaulting to the host’s physical core count. The memory pool is auto-sized from the detected host or cgroup limit; see the tuning guide.

§Using it as a library

ExecutorProcessConfig carries the same override hooks as the scheduler, so an embedder can supply its own runtime producer, config producer, or plan codecs. See examples/examples/custom-executor.rs. new_standalone_executor starts an in-process executor, which is what the client’s standalone mode uses.

§Cargo features

FeatureDefaultDescription
arrow-ipc-optimizationsYesArrow IPC fast paths for shuffle read and write
build-binaryYesBuilds the binary, with CLI parsing, logging, and probes
mimallocYesmimalloc allocator, enabled through build-binary
spark-compatNoRegisters Spark-compatible functions

§Documentation

Modules§

collect
Execution plan for collecting distributed query results into a single partition. The CollectExec operator retrieves results from the cluster and returns them as a single vector of RecordBatch.
config
Command-line configuration for the executor binary. Command-line configuration parsing for the Ballista executor binary.
execution_engine
Extension point for custom query stage execution engines. Execution engine abstraction for query stage execution.
execution_loop
Pull-based task execution loop that polls the scheduler for work. Pull-based task execution loop for the executor.
executor
Core executor implementation for running distributed query tasks. Ballista executor logic
executor_process
Executor process lifecycle management and configuration. Ballista Executor Process
executor_server
gRPC server for receiving pushed tasks from the scheduler. Executor gRPC server for push-based task scheduling.
flight_service
Arrow Flight service for streaming shuffle data between executors. Implementation of the Apache Arrow Flight protocol that wraps an executor.
health
HTTP server for Kubernetes-style /healthz and /readyz probes. Shared readiness state for Kubernetes-style health probes.
metrics
Metrics collection for executor runtime statistics.
runtime_cache
Session-scoped cache of shared executor runtime environments. Session-scoped reuse of executor runtime state.
shutdown
Graceful shutdown coordination for executor components. Graceful shutdown coordination for executor components.
terminate
Signal handling for process termination. Cross-platform signal handling for process termination.

Structs§

TaskCompletionExtras
Side-channel data harvested from a task’s executed plan, attached to the TaskStatus reported to the scheduler on success.
TaskExecutionTimes
Timestamps capturing the lifecycle of a task execution.

Functions§

as_task_status
Converts a task execution result into a TaskStatus protobuf message.
new_standalone_executor
Creates standalone executor with most values set as default.
new_standalone_executor_from_builder
Creates a standalone executor with custom configuration.
new_standalone_executor_from_state
Creates new standalone executor based on session_state provided.

Type Aliases§

ArrowFlightServerProvider
ArrowFlightServerProvider provides a function which creates a new Arrow Flight server.