You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2020/12/17 15:06:45 UTC
[spark] branch branch-3.0 updated: [SPARK-33774][UI][CORE] Back to
Master" returns 500 error in Standalone cluster
This is an automated email from the ASF dual-hosted git repository.
srowen pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 99eb027 [SPARK-33774][UI][CORE] Back to Master" returns 500 error in Standalone cluster
99eb027 is described below
commit 99eb02745e85a11dbbb1fa5de1167f07cd499797
Author: yi.wu <yi...@databricks.com>
AuthorDate: Thu Dec 17 08:52:09 2020 -0600
[SPARK-33774][UI][CORE] Back to Master" returns 500 error in Standalone cluster
### What changes were proposed in this pull request?
Initiate the `masterWebUiUrl` with the `webUi. webUrl` instead of the `masterPublicAddress`.
### Why are the changes needed?
Since [SPARK-21642](https://issues.apache.org/jira/browse/SPARK-21642), `WebUI` has changed from `localHostName` to `localCanonicalHostName` as the hostname to set up the web UI. However, the `masterPublicAddress` is from `RpcEnv`'s host address, which still uses `localHostName`. As a result, it returns the wrong Master web URL to the Worker.
### Does this PR introduce _any_ user-facing change?
Yes, when users click "Back to Master" in the Worker page:
Before this PR:
<img width="3258" alt="WeChat4acbfd163f51c76a5f9bc388c7479785" src="https://user-images.githubusercontent.com/16397174/102057951-b9664280-3e29-11eb-8749-5ee293902bdf.png">
After this PR:
![image](https://user-images.githubusercontent.com/16397174/102058016-d438b700-3e29-11eb-8641-a23a6b2f542e.png)
(Return to the Master page successfully.)
### How was this patch tested?
Tested manually.
Closes #30759 from Ngone51/fix-back-to-master.
Authored-by: yi.wu <yi...@databricks.com>
Signed-off-by: Sean Owen <sr...@gmail.com>
(cherry picked from commit 34e4d87023535c086a0aa43fe194f794b41e09b7)
Signed-off-by: Sean Owen <sr...@gmail.com>
---
core/src/main/scala/org/apache/spark/deploy/master/Master.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
index 3818a87..ab6cb30 100644
--- a/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/master/Master.scala
@@ -143,7 +143,7 @@ private[deploy] class Master(
logInfo(s"Running Spark version ${org.apache.spark.SPARK_VERSION}")
webUi = new MasterWebUI(this, webUiPort)
webUi.bind()
- masterWebUiUrl = s"${webUi.scheme}$masterPublicAddress:${webUi.boundPort}"
+ masterWebUiUrl = webUi.webUrl
if (reverseProxy) {
masterWebUiUrl = conf.get(UI_REVERSE_PROXY_URL).orElse(Some(masterWebUiUrl)).get
webUi.addProxy()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org