Skip to content
Snippets Groups Projects
Commit 6f7a7683 authored by Benoy Antony's avatar Benoy Antony Committed by Thomas Graves
Browse files

[SPARK-3286] - Cannot view ApplicationMaster UI when Yarn’s url scheme i...

...s https

Author: Benoy Antony <benoy@apache.org>

Closes #2276 from benoyantony/SPARK-3286 and squashes the following commits:

c3d51ee [Benoy Antony] Use address with scheme, but Allpha version removes the scheme
e82f94e [Benoy Antony] Use address with scheme, but Allpha version removes the scheme
92127c9 [Benoy Antony] rebasing from master
450c536 [Benoy Antony] [SPARK-3286] - Cannot view ApplicationMaster UI when Yarn’s url scheme is https
f060c02 [Benoy Antony] [SPARK-3286] - Cannot view ApplicationMaster UI when Yarn’s url scheme is https
parent b734ed0c
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
package org.apache.spark.deploy.yarn
import scala.collection.{Map, Set}
import java.net.URI;
import org.apache.hadoop.net.NetUtils
import org.apache.hadoop.yarn.api._
......@@ -97,7 +98,8 @@ private class YarnRMClientImpl(args: ApplicationMasterArguments) extends YarnRMC
// Users can then monitor stderr/stdout on that node if required.
appMasterRequest.setHost(Utils.localHostName())
appMasterRequest.setRpcPort(0)
appMasterRequest.setTrackingUrl(uiAddress)
//remove the scheme from the url if it exists since Hadoop does not expect scheme
appMasterRequest.setTrackingUrl(new URI(uiAddress).getAuthority())
resourceManager.registerApplicationMaster(appMasterRequest)
}
......
......@@ -189,7 +189,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
if (sc == null) {
finish(FinalApplicationStatus.FAILED, "Timed out waiting for SparkContext.")
} else {
registerAM(sc.ui.appUIHostPort, securityMgr)
registerAM(sc.ui.appUIAddress, securityMgr)
try {
userThread.join()
} finally {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment