Skip to content

Commit 7010b28

Browse files
committed
Re-add quotes to env vars. Add the new SPARK_NO_DAEMONIZE flag to the spark-env.sh.template file
1 parent 42c9874 commit 7010b28

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

conf/spark-env.sh.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@
6363
# - SPARK_PID_DIR Where the pid file is stored. (Default: /tmp)
6464
# - SPARK_IDENT_STRING A string representing this instance of spark. (Default: $USER)
6565
# - SPARK_NICENESS The scheduling priority for daemons. (Default: 0)
66+
# - SPARK_NO_DAEMONIZE Run the proposed command in the foreground. It will not output a PID file.

sbin/spark-daemon.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ execute_command() {
131131

132132
echo "$newpid" > "$pid"
133133

134-
#Poll for up to 5 seconds for the java process to start
134+
# Poll for up to 5 seconds for the java process to start
135135
for i in {1..10}
136136
do
137137
if [[ $(ps -p "$newpid" -o comm=) =~ "java" ]]; then
@@ -176,11 +176,11 @@ run_command() {
176176

177177
case "$mode" in
178178
(class)
179-
execute_command nice -n $SPARK_NICENESS ${SPARK_HOME}/bin/spark-class $command $@
179+
execute_command nice -n "$SPARK_NICENESS" "${SPARK_HOME}"/bin/spark-class $command $@
180180
;;
181181

182182
(submit)
183-
execute_command nice -n $SPARK_NICENESS bash ${SPARK_HOME}/bin/spark-submit --class $command $@
183+
execute_command nice -n "$SPARK_NICENESS" bash "${SPARK_HOME}"/bin/spark-submit --class $command $@
184184
;;
185185

186186
(*)

0 commit comments

Comments
 (0)