Skip to content

Commit

Permalink
use pyArchivesEnvOpt
Browse files Browse the repository at this point in the history
  • Loading branch information
lianhuiwang committed Apr 29, 2015
1 parent e6b573b commit 4b8a3ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,9 @@ object SparkSubmit {
// that can be distributed with the job
if (args.isPython && clusterManager == YARN) {
var pyArchives: String = null
if (sys.env.contains("PYSPARK_ARCHIVES_PATH")) {
pyArchives = sys.env.get("PYSPARK_ARCHIVES_PATH").get
val pyArchivesEnvOpt = sys.env.get("PYSPARK_ARCHIVES_PATH")
if (pyArchivesEnvOpt.isDefined) {
pyArchives = pyArchivesEnvOpt.get
} else {
if (!sys.env.contains("SPARK_HOME")) {
printErrorAndExit("SPARK_HOME does not exist for python application in yarn mode.")
Expand Down

0 comments on commit 4b8a3ed

Please sign in to comment.