Skip to content

Commit

Permalink
Prevent YARN filter from being added to the Spark UI
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinii committed Jan 25, 2024
1 parent c93bba8 commit 4a091f6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ private[spark] class ApplicationMaster(
registerAM(Utils.localHostName, -1, sparkConf,
sparkConf.getOption("spark.driver.appUIAddress"), appAttemptId)
val encodedAppId = URLEncoder.encode(appAttemptId.getApplicationId.toString, "UTF-8")
addAmIpFilter(Some(driverRef), s"/proxy/$encodedAppId")
// addAmIpFilter(Some(driverRef), s"/proxy/$encodedAppId")
createAllocator(driverRef, sparkConf, clientRpcEnv, appAttemptId, cachedResourcesConf)
reporterThread.join()
} catch {
Expand Down Expand Up @@ -499,7 +499,7 @@ private[spark] class ApplicationMaster(
}

private def runDriver(): Unit = {
addAmIpFilter(None, System.getenv(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV))
// addAmIpFilter(None, System.getenv(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV))
userClassThread = startUserApplication()

// This a bit hacky, but we need to wait until the spark.driver.port property has
Expand Down Expand Up @@ -556,8 +556,8 @@ private[spark] class ApplicationMaster(
val driverRef = rpcEnv.setupEndpointRef(
RpcAddress(driverHost, driverPort),
YarnSchedulerBackend.ENDPOINT_NAME)
addAmIpFilter(Some(driverRef),
System.getenv(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV))
// addAmIpFilter(Some(driverRef),
// System.getenv(ApplicationConstants.APPLICATION_WEB_PROXY_BASE_ENV))
createAllocator(driverRef, sparkConf, rpcEnv, appAttemptId, distCacheConf)

// In client mode the actor will stop the reporter thread.
Expand Down

0 comments on commit 4a091f6

Please sign in to comment.