Skip to content

Commit

Permalink
[SPARK-3286] - Cannot view ApplicationMaster UI when Yarn’s url schem…
Browse files Browse the repository at this point in the history
…e is https
  • Loading branch information
Benoy Antony committed Sep 5, 2014
1 parent f060c02 commit 450c536
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ 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)
//remove the scheme from the url if it exists since Hadoop does not expect scheme
appMasterRequest.setTrackingUrl(uiAddress.replaceAll("^http(\\w)*://", ""))
resourceManager.registerApplicationMaster(appMasterRequest)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ private[spark] class ApplicationMaster(args: ApplicationMasterArguments,
if (sc == null) {
finish(FinalApplicationStatus.FAILED, "Timed out waiting for SparkContext.")
} else {
registerAM(sc.ui.appUIAddress)
var uiAddress = sc.ui.appUIHostPort
if (yarnConf.get("yarn.http.policy").equals("HTTPS_ONLY")) {
uiAddress = sc.ui.appUIAddress
}
registerAM(uiAddress)
try {
userThread.join()
} finally {
Expand Down

0 comments on commit 450c536

Please sign in to comment.