We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6b573b commit 4b8a3edCopy full SHA for 4b8a3ed
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
@@ -332,8 +332,9 @@ object SparkSubmit {
332
// that can be distributed with the job
333
if (args.isPython && clusterManager == YARN) {
334
var pyArchives: String = null
335
- if (sys.env.contains("PYSPARK_ARCHIVES_PATH")) {
336
- pyArchives = sys.env.get("PYSPARK_ARCHIVES_PATH").get
+ val pyArchivesEnvOpt = sys.env.get("PYSPARK_ARCHIVES_PATH")
+ if (pyArchivesEnvOpt.isDefined) {
337
+ pyArchives = pyArchivesEnvOpt.get
338
} else {
339
if (!sys.env.contains("SPARK_HOME")) {
340
printErrorAndExit("SPARK_HOME does not exist for python application in yarn mode.")
0 commit comments