Skip to content

Commit 7cc70e4

Browse files
committed
Clean up terminology inside of spark-env script
1 parent 5b0ba8e commit 7cc70e4

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

conf/spark-env.sh.template

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
#!/usr/bin/env bash
22

3-
# This file contains environment variables required to run Spark. Copy it as
4-
# spark-env.sh and edit that to configure Spark for your site.
5-
#
6-
# The following variables can be set in this file:
3+
# This file is sourced when running various Spark classes.
4+
# Copy it as spark-env.sh and edit that to configure Spark for your site.
5+
6+
# Options read when launching programs locally with
7+
# ./bin/spark-example or ./bin/spark-submit
78
# - SPARK_LOCAL_IP, to set the IP address Spark binds to on this node
89
# - SPARK_PUBLIC_DNS, to set the public dns name of the driver program
10+
# - SPARK_CLASSPATH, default classpath entries to append
11+
12+
# Options read by executors and drivers running inside the cluster
13+
# - SPARK_LOCAL_IP, to set the IP address Spark binds to on this node
14+
# - SPARK_PUBLIC_DNS, to set the public DNS name of the driver program
915
# - SPARK_LOCAL_DIRS, shuffle directories to use on this node
1016
# - MESOS_NATIVE_LIBRARY, to point to your libmesos.so if you use Mesos
11-
# - SPARK_JAVA_OPTS, to set node-specific JVM options for Spark. Note that
12-
# we recommend setting app-wide options in the application's driver program.
13-
# Examples of node-specific options : -Dspark.local.dir, GC options
14-
# Examples of app-wide options : -Dspark.serializer
15-
#
16-
# If using the standalone deploy mode, you can also set variables for it here:
17+
# - SPARK_CLASSPATH, default classpath entries to append
18+
19+
# Options for the daemons used in the standalone deploy mode:
1720
# - SPARK_MASTER_IP, to bind the master to a different IP address or hostname
1821
# - SPARK_MASTER_PORT / SPARK_MASTER_WEBUI_PORT, to use non-default ports
1922
# - SPARK_MASTER_OPTS, to set config properties at the master (e.g "-Dx=y")

docs/configuration.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,9 @@ This is a useful place to check to make sure that your properties have been set
666666
# Environment Variables
667667

668668
Certain Spark settings can be configured through environment variables, which are read from the `conf/spark-env.sh`
669-
script in the directory where Spark is installed (or `conf/spark-env.cmd` on Windows). These variables are meant to be for machine-specific settings, such
670-
as library search paths. While Spark properties can also be set there through `SPARK_JAVA_OPTS`, for per-application settings, we recommend setting
671-
these properties within the application instead of in `spark-env.sh` so that different applications can use different
672-
settings.
669+
script in the directory where Spark is installed (or `conf/spark-env.cmd` on Windows). In Standalone and Mesos modes,
670+
this file can give machine specific information such as hostnames. It is also sourced when running local
671+
Spark applications or submission scripts.
673672

674673
Note that `conf/spark-env.sh` does not exist by default when Spark is installed. However, you can copy
675674
`conf/spark-env.sh.template` to create it. Make sure you make the copy executable.
@@ -682,8 +681,7 @@ The following variables can be set in `spark-env.sh`:
682681
* `SPARK_CLASSPATH`, to add elements to Spark's classpath that you want to be present for _all_ applications.
683682
Note that applications can also add dependencies for themselves through `SparkContext.addJar` -- we recommend
684683
doing that when possible.
685-
* `SPARK_JAVA_OPTS`, to add JVM options. This includes Java options like garbage collector settings and any system
686-
properties that you'd like to pass with `-D`.
684+
* `SPARK_PUBLIC_DNS`, the hostname your Spark program will advertise to other machines.
687685
* Options for the Spark [standalone cluster scripts](spark-standalone.html#cluster-launch-scripts), such as number of cores
688686
to use on each machine and maximum memory.
689687

0 commit comments

Comments
 (0)