feat: expose comet metrics through Sparks external monitoring system#3708
Open
coderfender wants to merge 3 commits intoapache:mainfrom
Open
feat: expose comet metrics through Sparks external monitoring system#3708coderfender wants to merge 3 commits intoapache:mainfrom
coderfender wants to merge 3 commits intoapache:mainfrom
Conversation
aa97dec to
f096d8f
Compare
Contributor
Author
|
cc : @andygrove |
wForget
reviewed
Mar 16, 2026
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala
Outdated
Show resolved
Hide resolved
f096d8f to
c0eb149
Compare
Contributor
Author
|
@wForget , Please take a look whenever you get a chance |
c0eb149 to
2eb506f
Compare
wForget
reviewed
Mar 17, 2026
spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala
Outdated
Show resolved
Hide resolved
wForget
reviewed
Mar 17, 2026
8c60dc8 to
eaa1dc4
Compare
Contributor
Author
|
@wForget , I addressed code per your review comments. Please take a look whenever you get a chance. Thank you for the kind guidance |
wForget
reviewed
Mar 17, 2026
Comment on lines
+106
to
+107
| val queriesBefore = CometSource.QUERIES_PLANNED.getCount | ||
| spark.sparkContext.listenerBus.waitUntilEmpty() |
Member
There was a problem hiding this comment.
Suggested change
| val queriesBefore = CometSource.QUERIES_PLANNED.getCount | |
| spark.sparkContext.listenerBus.waitUntilEmpty() | |
| spark.sparkContext.listenerBus.waitUntilEmpty() | |
| val queriesBefore = CometSource.QUERIES_PLANNED.getCount |
wForget
reviewed
Mar 17, 2026
| } | ||
|
|
||
| object CometDriverPlugin extends Logging { | ||
| def registerQueryExecutionListener(conf: SparkConf): Unit = { |
Member
There was a problem hiding this comment.
- move
sc.env.metricsSystem.registerSource(CometSource)into this method, and add a configuration to make this behavior configurable - Check if
spark.sql.queryExecutionListenersis configured and merge it. You can refer to the implementation ofregisterCometSessionExtensionmethod.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #3712
Rationale for this change
The following metrics are exposed at the moment :
What changes are included in this PR?
How are these changes tested?