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 4Each 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
| Feature | Default | Description |
|---|---|---|
arrow-ipc-optimizations | Yes | Arrow IPC fast paths for shuffle read and write |
build-binary | Yes | Builds the binary, with CLI parsing, logging, and probes |
mimalloc | Yes | mimalloc allocator, enabled through build-binary |
spark-compat | No | Registers 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§
- Task
Completion Extras - Side-channel data harvested from a task’s executed plan, attached to the
TaskStatusreported to the scheduler on success. - Task
Execution Times - Timestamps capturing the lifecycle of a task execution.
Functions§
- as_
task_ status - Converts a task execution result into a
TaskStatusprotobuf 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§
- Arrow
Flight Server Provider - ArrowFlightServerProvider provides a function which creates a new Arrow Flight server.