Comet Native Executors: report each stage's Comet block metrics to Ballista

Đang mở
#7,465 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
22/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust, scala, spark

Hướng nghiên cứu

The block is CometFragmentExec, which reports no metrics; its metrics() and the plan it builds inside execute are where the change starts. Ballista's stage metric aggregation, which sums elapsed_compute over the stage's operators and counts input rows from plan leaves, is the other side. Done means a two-stage query shows non-zero compute time and correct input rows for the range stage in the scheduler event log.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement requires-triage
What is the problem the feature request solves?

Ballista takes a task's metrics from the operators of its stage plan. On a Comet Native Executor cluster, a stage's plan is a shuffle writer over a CometFragmentExec, whose children are the stage's partition descriptor and its shuffle readers. CometFragmentExec reports no metrics, and the Comet operators run in a plan it builds inside execute, which Ballista never sees. So in the scheduler's event logs (COMET_SCHEDULER_EVENT_LOG_DIR, #7420) and stage summaries:

  • A task's compute time (elapsed_compute_nanos) covers only its shuffle readers' poll time, and is 0 for a stage with no shuffle input.
  • Input rows count only the rows a stage reads from other stages, so a stage that reads files or makes its own rows logs 0.
  • The plan shows each block only as CometFragmentExec: block=N bytes.

In a two-stage query, a range stage hash-shuffled into a stage that reads it, the range stage's task logged 0 input rows and 0 compute time, and the reading stage's task logged 1000 input rows and 3.3 ms, the shuffle reader's poll time. Output rows and task times are right.

Describe the potential solution

CometFragmentExec could keep the plan it builds for each partition and report the block's metrics from metrics(): its operators' elapsed_compute, and the output rows of its file scans and other leaves. Ballista sums elapsed_compute over every operator of the stage, so the block's figure shouldn't count the time its inputs spend in the shuffle readers, which report their own. Ballista counts a stage's input rows from the plan's leaves, and CometFragmentExec isn't one, so rows read from files need another way in, whether a leaf that reports them or a change to how Ballista counts input rows.

#7373 needs the block's per-operator metrics too, to fill in the Spark UI.

Additional context

Found in the review of #7420: https://github.com/apache/datafusion-comet/pull/7420#discussion_r4460104688

Part of #7288.

Willingness to contribute

Yes. I can contribute this feature independently.

Ngôn ngữ chính
Scala
Star
1.3k
Fork
414
Merge trung bình
3 ngày 5 giờ
Pull request đã merge (30 ngày)
210

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/datafusion-comet

Tất cả issue của apache/datafusion-comet

Issue tương tự

Thêm issue về Scala

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.