Skip to content

Commit 98afd45

Browse files
committed
[MAPRYARN-397] Proxy should respond to client with a redirect if it gets SSL errors from server (apache#1118)
Co-authored-by: Egor Krivokon <>
1 parent fc9d7ab commit 98afd45

File tree

5 files changed

+10
-133
lines changed

5 files changed

+10
-133
lines changed

assembly/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@
7979
<artifactId>classpath-filter_${scala.binary.version}</artifactId>
8080
<version>${project.version}</version>
8181
</dependency>
82-
<dependency>
83-
<groupId>org.apache.spark</groupId>
84-
<artifactId>nvidia-plugin_${scala.binary.version}</artifactId>
85-
<version>${project.version}</version>
86-
</dependency>
8782
<dependency>
8883
<groupId>org.apache.spark</groupId>
8984
<artifactId>hive-site-editor_${scala.binary.version}</artifactId>

common/nvidia-plugin/pom.xml

Lines changed: 0 additions & 89 deletions
This file was deleted.

common/nvidia-plugin/src/main/scala/org/apache/spark/provider/EEPShimServiceProvider.scala

Lines changed: 0 additions & 36 deletions
This file was deleted.

conf/spark-defaults.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ spark.executor.memory 2g
2424
spark.driver.defaultJavaOptions --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED
2525
spark.executor.defaultJavaOptions --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED
2626
spark.yarn.am.extraJavaOptions --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED
27+
28+
# Workaround for correct styles for UI when using RM redirect instead of proxy in cluster mode - MAPRYARN-397
29+
# Proxy base should be set to an empty string because EEP Yarn uses redirect instead of default Apache behavior (proxy)
30+
spark.ui.proxyBase

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import org.apache.hadoop.yarn.api.records._
3737
import org.apache.hadoop.yarn.conf.YarnConfiguration
3838
import org.apache.hadoop.yarn.exceptions.ApplicationAttemptNotFoundException
3939
import org.apache.hadoop.yarn.util.{ConverterUtils, Records}
40-
4140
import org.apache.spark._
4241
import org.apache.spark.deploy.SparkHadoopUtil
4342
import org.apache.spark.deploy.history.HistoryServer
@@ -700,8 +699,12 @@ private[spark] class ApplicationMaster(
700699
d.send(AddWebUIFilter(amFilter, params, proxyBase))
701700

702701
case None =>
703-
System.setProperty(UI_FILTERS.key, amFilter)
704-
params.foreach { case (k, v) => System.setProperty(s"spark.$amFilter.param.$k", v) }
702+
// MAPRYARN-397: EEP Yarn uses redirect instead of proxy by default to avoid SSLHandshake exception.
703+
// So we do not need to use AmIpFilter which is using to work with proxy.
704+
if (!yarnConf.getBoolean("yarn.web-proxy.redirect.sslhandshake", false)) {
705+
System.setProperty(UI_FILTERS.key, amFilter)
706+
params.foreach { case (k, v) => System.setProperty(s"spark.$amFilter.param.$k", v) }
707+
}
705708
}
706709
}
707710

0 commit comments

Comments
 (0)