-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37383][SQL][WEBUI]Show the parsing time for each phase of a SQL on spark ui #35744
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
|
@cloud-fan Could you please help review the code? thanks |
| */ | ||
| def logTimeSpent(): Unit = { | ||
| var totalTimeSpent = 0L | ||
| val timeSpentSummary: StringBuffer = new StringBuffer() |
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.
Maybe StringBuilder is ok
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 seems so. thanks, updated
| import org.apache.spark.internal.Logging | ||
| import org.apache.spark.util.BoundedPriorityQueue | ||
|
|
||
|
|
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.
no need to remove this line
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, updated
|
Can one of the admins verify this patch? |
|
@rxin Hi, could you help to review this patch? thanks |
|
|
||
|
|
||
| class QueryPlanningTracker { | ||
| class QueryPlanningTracker extends Logging { |
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.
This is for third-party tools to track the query status... If we want Spark to show these metrics out of the box, I don't think log is the right place. Web UI is probably better but we need some design.
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 seems like a good idea, i'll try to fix it
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.
@cloud-fan Hi, could you help to review this patch again? thanks
|
@caican00 You should add a screenshot to the pr description and highlight the specific changes because this pr will cause Need add |
@LuciferYang Hi, i have update it. Could you help to review this patch again? thanks |
|
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. |
What changes were proposed in this pull request?
The PR is proposed to:

show the timeSpent for each phase of a SQL on spark ui.
The implications of the following indicators
Why are the changes needed?
the time spent for each parsing phase of a SQL is counted and recorded in QueryPlanningTracker , but it is not yet shown anywhere.
when SQL parsing is suspected to be slow, we cannot confirm which phase is slow,therefore, it is necessary to show the SQL parsing time.
Does this PR introduce any user-facing change?
No
How was this patch tested?
modified tests.