Skip to content

Commit

Permalink
SPARK-1652: Set driver memory correctly in spark-submit.
Browse files Browse the repository at this point in the history
The previous check didn't account for the fact that the default
deploy mode is "client" unless otherwise specified. Also, this
sets the more narrowly defined SPARK_DRIVER_MEM instead of setting
SPARK_MEM.
  • Loading branch information
pwendell committed May 11, 2014
1 parent 70bcdef commit f508146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/spark-submit
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ while (($#)); do
shift
done

if [ ! -z $DRIVER_MEMORY ] && [ ! -z $DEPLOY_MODE ] && [ $DEPLOY_MODE = "client" ]; then
export SPARK_MEM=$DRIVER_MEMORY
if [ ! -z $DRIVER_MEMORY ] && [ ! "$DEPLOY_MODE" == "cluster" ]; then
export SPARK_DRIVER_MEMORY=$DRIVER_MEMORY
fi

$SPARK_HOME/bin/spark-class org.apache.spark.deploy.SparkSubmit "${ORIG_ARGS[@]}"
Expand Down

0 comments on commit f508146

Please sign in to comment.