Skip to content

Commit 6217b38

Browse files
committed
Respect SPARK_*_MEMORY for cluster mode
1 parent f9d6220 commit 6217b38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmitArguments.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ private[spark] class SparkSubmitArguments(args: Seq[String]) {
7575
defaultProperties
7676
}
7777

78+
// Respect SPARK_*_MEMORY for cluster mode
79+
driverMemory = sys.env.get("SPARK_DRIVER_MEMORY").orNull
80+
executorMemory = sys.env.get("SPARK_EXECUTOR_MEMORY").orNull
81+
7882
parseOpts(args.toList)
7983
mergeSparkProperties()
8084
checkRequiredArguments()

0 commit comments

Comments
 (0)