-
Notifications
You must be signed in to change notification settings - Fork 29k
[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
Conversation
|
ping @srowen since I have found you handle similar prs before in 2014 |
|
Test build #141391 has started for PR 33457 at commit |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
srowen
left a comment
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 don't know a lot about this, but it seems reasonable
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141406 has finished for PR 33457 at commit
|
|
cc @gengliangwang and @sarutak FYI |
|
Any suggestion? |
|
@AngersZhuuuu But after this change, the status code It might be confusable for users. |
With this 500 and error stack in the log makes user confused too.. they always ask me if there is something wong. Anyway expose a non-useable api is not reasonable? right? |
|
Also you can check this related issue #1966 |
|
Shall we make the RESTFUL request hang and the web page loading if the spark application is not fully started? |
@AngersZhuuuu could you update the PR description to make it more clear? |
At least before the changes it shows hint "if you are starting spark..." |
Or we can just redirect to a page saying Spark is starting |
How about current? |
|
Kubernetes integration test starting |
|
retest this please |
|
The web UI looks good. How about REST request? |
|
Test build #141754 has finished for PR 33457 at commit
|
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Kubernetes integration test starting |
|
Kubernetes integration test status success |
|
Test build #141755 has finished for PR 33457 at commit
|
|
@AngersZhuuuu Please update the PR description. Especially for the first and third ones. |
How about current? |
|
Kubernetes integration test starting |
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Kubernetes integration test status failure |
|
Test build #141778 has finished for PR 33457 at commit
|
| .setMaster("local") | ||
| .setAppName("test") | ||
| .set(UI.UI_ENABLED, false) | ||
| val sc = new SparkContext(conf) |
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 the test failure in GA related this the changes here?
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 the test failure in GA related this the changes here?
Seems so..
|
@AngersZhuuuu seriously, the description is badly written. Also, please mention that there will be a hint saying that "Spark is starting up" in section "Does this PR introduce any user-facing change?" |
How about current? |
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #141852 has finished for PR 33457 at commit
|
|
@gengliangwang GA passed now |
|
ping @gengliangwang @sarutak |
|
Thanks, merging to master |
I have the same bug. |
|
@gongzh021 Maybe you can check this commit dba26cd |
1 similar comment
|
@gongzh021 Maybe you can check this commit dba26cd |



What changes were proposed in this pull request?
When using prometheus to fetch metrics with a defined interval, we always pull data through restful API.
If the pulling happens when a driver SparkUI port is bind to the driver and the application is not fully started, Spark driver will throw a lot of exceptions about NoSuchElementException as below.
Have check origin pr, we need to start server and bind port before taskScheduler started for client mode since we need to pass web url to register application master. But when we attach and start handler this time, we can provide restful API to user, but during this time, application is not started so we always return such error.
In this pr, to start SparUI, Spark starts Jetty Server first to bind address.
After the Spark application is fully started, call [attachAllHandlers] to start all existing handlers to Jetty seerver.
Why are the changes needed?
Improve the SparkUI start logical
Does this PR introduce any user-facing change?
Before spark application is fully started, all url request will return
in the page
How was this patch tested?
Existed
During after bind address and finish start spark application, all request will show
