feat: add cluster settings to the Comet Native Executor binaries #7420
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 370 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #7420"
general
weight: 0.35
sunchao
Which issue does this PR close?
Part of #7288.
Rationale for this change
comet-schedulerandcomet-executoronly expose the settings that a local, single-machine cluster needs. Running them on a real cluster, as the TPC-H runs in #7289 do, needs a few more of Ballista's settings: an external host for the scheduler, larger gRPC message limits for tasks with many scan partitions, a fixed executor memory pool, and the scheduler's per-query event logs for looking at stage timings. This splits those settings out of #7289. Each one sets a field that the Ballista 55.0.0 release already has, so this does not depend on any unmerged Ballista change.What changes are included in this PR?
New environment variables, each documented in the binary's module docs:
COMET_SCHEDULER_EXTERNAL_HOST: the host executors reach the scheduler at.COMET_GRPC_MAX_MESSAGE_SIZE: the largest gRPC message the scheduler and executor send or accept (Ballista's default is 16 MiB).COMET_EXECUTOR_MEMORY_POOL_SIZE: the executor's memory budget, which Ballista splits into a pool per task.COMET_SCHEDULER_EVENT_LOG_DIR: a directory for one Ballista event log per query. The scheduler doesn't start if it can't write there.The event-log writer is behind
ballista-scheduler'srest-apifeature, so that feature is enabled. In 55.0.0 that feature also needs thetracingfeature to compile without the default features, so that is enabled too (fixed upstream in apache/datafusion-ballista#2747).Compiling
rest-apialso compiles Ballista's REST API, which would be served on the scheduler's gRPC port with no authentication, including a route that cancels jobs. The scheduler setsdisable_rest_api: true, so the API is not served while the event-log writer still runs. apache/datafusion-ballista#2745 proposes compiling the writer without the API, and apache/datafusion-ballista#2746 proposes not serving the API on that port by default.Ballista sees each stage's Comet block as one operator without metrics, so for Comet stages the logs' input rows count only the rows read from other stages, and a task's compute time covers only that reading. The scheduler's docs say so, and #7465 tracks reporting the block's metrics.
How are these changes tested?
Each variable is passed straight through to the matching Ballista config field. A new cluster test,
writes_event_logs_without_serving_the_rest_api, runs a query withCOMET_SCHEDULER_EVENT_LOG_DIRset, waits for a finished.eventlog, and checks thatGET /api/jobson the scheduler port returns 404 (it returns 200 withoutdisable_rest_api). Another,refuses_an_event_log_dir_it_cannot_write, sets the variable to a path inside a regular file and checks that the scheduler exits with an error naming it. The existingnative-executorscluster tests still pass, and clippy is clean with--all-targets -D warnings. The settings were used for the TPC-H runs in #7289.