Skip to content

[AURON #2189] Periodically publish native metrics for long-running Fl… - #2494

Open
qingfei1994 wants to merge 2 commits into
apache:masterfrom
qingfei1994:master
Open

[AURON #2189] Periodically publish native metrics for long-running Fl…#2494
qingfei1994 wants to merge 2 commits into
apache:masterfrom
qingfei1994:master

Conversation

@qingfei1994

Copy link
Copy Markdown

…ink tasks

Which issue does this PR close?

Closes #2189

Rationale for this change

Native DataFusion metrics were only published to MetricNode when the native runtime finalized. Spark batch tasks hit that path; long-running Flink tasks (Kafka source) do not, so Flink counters never moved after #2186 wired add to Flink.

What changes are included in this PR?

  • Periodic native metric publish on a tokio interval, sending positive deltas so incremental MetricNode.add does not double-count.
  • Config auron.metrics.update.interval.ms (default 1000; 0 = finalize-only).
  • FlinkMetricNode.fromPlan so Kafka (including fused Project[Filter[KafkaScan]]) and Calc share a plan-shaped metric tree for getChild(i).

Are there any user-facing changes?

Operators can set auron.metrics.update.interval.ms (default 1000ms). Spark SQL metrics may update during the job as a side effect of the same ticker.

How was this patch tested?

  • cargo test -p auron metrics
  • Maven: FlinkMetricNodeFromPlanTest, AuronKafkaSourceFunctionMergeTest, FlinkMetricNodeTest, AuronAdaptorTest

Was this patch authored or co-authored using generative AI tooling?

  • Yes
  • No

If yes, include: Generated-by: Cursor Grok 4.6

ASF guidance: https://www.apache.org/legal/generative-tooling.html

@qingfei1994
qingfei1994 marked this pull request as ready for review August 31, 2026 13:55
@Tartarus0zm
Tartarus0zm requested a review from richox September 1, 2026 11:49
@Tartarus0zm

Copy link
Copy Markdown
Contributor

hi @richox could you please help review this PR when you get a chance? Thanks!

@richox

richox commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for implementing scheduled metric reporting in Auron.

Since this feature is currently only needed for Flink and not for Spark, I suggest adding a configuration item (e.g., auron.metrics.ticker.enabled) that is disabled by default and only enabled for Flink. This keeps the behavior opt-in and avoids unnecessary overhead for other engines.

Could you update the PR accordingly?

@qingfei1994

Copy link
Copy Markdown
Author

@richox I use a new configuration "auron.metrics.update.enabled", which is disabled by default and only when "flink.auron.metrics.update.enabled" = true and "flink.auron.metrics.update.interval.ms">0 will triggering the report metrics feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auron MetricNode periodic updates

3 participants