-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-36237][UI][SQL] Attach and start handler after application started in UI #33457
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
Closed
Closed
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7832d40
[SPARK-36237][SQL] We should attach and start handler after applicati…
AngersZhuuuu 4fb422c
update
AngersZhuuuu dba26cd
Update WebUI.scala
AngersZhuuuu 694a8fd
Update WebUI.scala
AngersZhuuuu 340d8d0
Update WebUI.scala
AngersZhuuuu 5299874
add UT
AngersZhuuuu 8665253
follow comment
AngersZhuuuu 4ce656c
update
AngersZhuuuu d2662fb
update
AngersZhuuuu 7903412
Update SparkUI.scala
AngersZhuuuu b575cab
update
AngersZhuuuu d5652d7
Update WebUI.scala
AngersZhuuuu 677a339
Update UISuite.scala
AngersZhuuuu b16531f
Update SparkUI.scala
AngersZhuuuu 15aec1a
Update SparkUI.scala
AngersZhuuuu c514855
Update SparkUI.scala
AngersZhuuuu 0c9c3ce
Update UISuite.scala
AngersZhuuuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
btw, why do we need to attach all the handlers again? And there are so many "attachAllHandler" in the code changes.
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.
That me clarify the process.
Before this change. We add handlers to SparkUI but not start it when init SparkUI since we not start jetty server.
Then it call
bind(), in this method we start jetty server and attach all handler to server.this cause a problem that when we call
bind(), we expose all servlet API to user. But application not fully started yet.Now in this pr, I split the behavior of start jetty server and attach handlers to server.
We need to bind address(start jetty server) first before start AM since we need driver url address to bind with spark proxy server.
Then after application fully started, we attach all handlers to server(means expose UI url to user).
For this comment #33457 (comment)
I add a initHandler to handle all request between starting jetty server and fully start application to show the hint message.
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 add some logging and find that
attachHandleris still called multiple times beforeattachAllHandlerThere 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, but when we call
attachHandler()theserverInfois none, so the handler is not attached to the server.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.
Is there a way to avoid calling
attachAllHandlerin so many places?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.
Add a new method call it
bindAndAttachAllHandler()then replace other place to call this one? only callbind()andattachAllHandlerin SparkContext?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.
Will that work for history server and master/worker UI? If yes let's try to avoid changing them.
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.
How about current?
Uh oh!
There was an error while loading. Please reload this page.
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 mean, will history server and master/worker UI show the same page(spark is starting up...) on starting up?
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.
With current code, won't impact history server/master/worker web UI. and history server/master/worker web UI doesn't have such problem.