Skip to content

Commit f060c02

Browse files
author
Benoy Antony
committed
[SPARK-3286] - Cannot view ApplicationMaster UI when Yarn’s url scheme is https
1 parent f2b5b61 commit f060c02

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

yarn/alpha/src/main/scala/org/apache/spark/deploy/yarn/YarnRMClientImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private class YarnRMClientImpl(args: ApplicationMasterArguments) extends YarnRMC
9696
// Users can then monitor stderr/stdout on that node if required.
9797
appMasterRequest.setHost(Utils.localHostName())
9898
appMasterRequest.setRpcPort(0)
99-
appMasterRequest.setTrackingUrl(uiAddress)
99+
appMasterRequest.setTrackingUrl(uiAddress.replaceAll("^http(\\w)*://", ""))
100100
resourceManager.registerApplicationMaster(appMasterRequest)
101101
}
102102

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
188188
if (sc == null) {
189189
finish(FinalApplicationStatus.FAILED, "Timed out waiting for SparkContext.")
190190
} else {
191-
registerAM(sc.ui.appUIHostPort)
191+
registerAM(sc.ui.appUIAddress)
192192
try {
193193
userThread.join()
194194
} finally {

0 commit comments

Comments
 (0)