-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-38617][SQL][WEBUI] Show Spark rule and phase timings in SQL UI and REST API #35939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
SPARK38617.txt is in rich text format. It would be easier to review if it was plain text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it would be better to use a new method instead of overwriting #toString().
toString might be called implicitly somewhere and cause performance issue. I have seen this in the wild few times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed method to compileStatsString
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In what cases this exception might be thrown ? I guess when #read() cannot find it.
It is weird that it does not return an Option or Either.
Also planGraph() and executionsList() above do not try to recover.
def execution(executionId: Long) does the same as here.
IMO this class needs some love.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this try catch statement as a precaution after adding the if statement on SQLAppStatusListener.scala:393. Some unit tests were failing without the if statement. I can remove the try catch statement if desired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should offset and length be validated to be positive ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It shouldn't be needed. I added SqlCompilerResource.scala based on SqlResource.scala
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the filtering filters nothing with the provided two persons. Is this intentional ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
|
#35856 has tried the similar things although at present it miss the details of the compile time for each phase. And its scope also includes the AQE, I think is good to go. |
def7ee9 to
63cbefd
Compare
Attached new file with plain text format. |
What does good to go mean here as I don't see an approval at #35856? From what I see the changes at #35856 are different and complimentary with this PR as that PR adds information regarding AQE plan description changes and this PR has timing of spark phases and rule timing information. The changes in both PRs will help for troubleshooting. |
|
cc @jchen5 |
|
@yliou I agree both can help for troubleshooting. And I have mentioned the difference, |
|
+CC @shardulm94, @thejdeep |
|
Can we use a more meaningful JSON field names? E.g., Also, can |
|
@ulysses-you got it. I think it is possible to re-use the same code path but not sure how that'd work with ExecutionPage.scala to get the info on the UI. |
Updated Json field names and changed |
|
@ulysses-you @yliou adding debug information is always good. But I'm worried about two issues:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class name mismatches: SqlCompilerResource vs SqlCompileResourceSuite (the r in compiler, typo?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching the typo! I renamed the file.
ab89b29 to
d47f6de
Compare
851e44a to
a492b63
Compare
|
Updated the PR to be more concise regarding the names of rules so that Spark event logs aren't as impacted as before in terms of size. |
c30d33e to
2a513a8
Compare
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
|
@dependabot reopen |
|
Hi @ulysses-you @linhongliu-db now that #35856 got reverted and #38567 got merged, should I create another pull request for this feature to try to get it merged? |
What changes were proposed in this pull request?
The changes proposed are to add a clickable field on SQL UI to show timing of spark phases and rule timing information from QueryPlanningTracker along with a separate REST endpoint to show the timing statistics. Adds a SQLConf to control the number of rules that
show up on the UI and the REST endpoint call (default value is 15).
UI Change:
New REST API endpoint output:
SPARK-38617RestOutput.txt
Why are the changes needed?
Currently user is unable to see Spark phase timing information or which Spark rules take the most time for a specific query execution on the UI. This PR adds that information.
Does this PR introduce any user-facing change?
Yes on the UI
How was this patch tested?
Tested locally and added a class to test the new endpoint.