← Back to Pull requests

feat: add cluster settings to the Comet Native Executor binaries #7420

Closed
unknown closed this pull request without merging on Nov 06, 2026 18:19 UTC
View on GitHub
unknown unknown commented on Nov 02, 2026 19:50 UTC
Author

Which issue does this PR close?

Part of #7288.

Rationale for this change

comet-scheduler and comet-executor only 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's rest-api feature, so that feature is enabled. In 55.0.0 that feature also needs the tracing feature to compile without the default features, so that is enabled too (fixed upstream in apache/datafusion-ballista#2747).

    Compiling rest-api also 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 sets disable_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 with COMET_SCHEDULER_EVENT_LOG_DIR set, waits for a finished .eventlog, and checks that GET /api/jobs on the scheduler port returns 404 (it returns 200 without disable_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 existing native-executors cluster tests still pass, and clippy is clean with --all-targets -D warnings. The settings were used for the TPC-H runs in #7289.

    Diff: 370 lines (+277 / -93) across 4 files Reviewer: sunchao Review duration: 5669m
    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
    0.43
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.8% (MEDIUM) · Higher = larger blast radius
    42.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.9% · Safe to merge
    16.9%