File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
core/src/main/scala/org/apache/spark/deploy/worker Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,12 @@ private[deploy] class Worker(
278278 if (reverseProxy) {
279279 logInfo(" WorkerWebUI is available at %s/proxy/%s" .format(
280280 activeMasterWebUiUrl.stripSuffix(" /" ), workerId))
281- // if reverseProxyUrl is not set, then we continue to generate relative URLs
282- // starting with "/" throughout the UI and do not use activeMasterWebUiUrl
283- val proxyUrl = conf.get(UI_REVERSE_PROXY_URL .key, " " ).stripSuffix(" /" )
284- System .setProperty(" spark.ui.proxyBase" , proxyUrl)
281+ // if reverseProxyUrl is not set, then we continue to generate relative URLs
282+ // starting with "/" throughout the UI and do not use activeMasterWebUiUrl
283+ val proxyUrl = conf.get(UI_REVERSE_PROXY_URL .key, " " ).stripSuffix(" /" )
284+ // In the method `UIUtils.makeHref`, the URL segment "/proxy/$worker_id" will be appended
285+ // after `proxyUrl`, so no need to set the worker ID in the `spark.ui.proxyBase` here.
286+ System .setProperty(" spark.ui.proxyBase" , proxyUrl)
285287 }
286288 // Cancel any outstanding re-registration attempts because we found a new master
287289 cancelLastRegistrationRetry()
You can’t perform that action at this time.
0 commit comments