Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove the deprecated configure parameter from 'spark-env.sh'
  • Loading branch information
ConeyLiu committed May 6, 2017
commit 50b4f2d2269f03f3650443405a28546843f98f53
1 change: 0 additions & 1 deletion conf/spark-env.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

# Options read in YARN client mode
# - HADOOP_CONF_DIR, to point Spark towards Hadoop configuration files
# - SPARK_EXECUTOR_INSTANCES, Number of executors to start (Default: 2)
# - SPARK_EXECUTOR_CORES, Number of cores for the executors (Default: 1).
# - SPARK_EXECUTOR_MEMORY, Memory per Executor (e.g. 1000M, 2G) (Default: 1G)
# - SPARK_DRIVER_MEMORY, Memory for Driver (e.g. 1000M, 2G) (Default: 1G)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,7 @@ object YarnSparkHadoopUtil {

initialNumExecutors
} else {
val targetNumExecutors =
sys.env.get("SPARK_EXECUTOR_INSTANCES").map(_.toInt).getOrElse(numExecutors)
// System property can override environment variable.
conf.get(EXECUTOR_INSTANCES).getOrElse(targetNumExecutors)
conf.get(EXECUTOR_INSTANCES).getOrElse(numExecutors)
}
}
}
Expand Down