File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,9 @@ if [ "$SPARK_NICENESS" = "" ]; then
124124fi
125125
126126execute_command () {
127- command=" $@ "
128- if [ " $SPARK_NO_DAEMONIZE " != " " ]; then
129- eval $command
130- else
131- eval " nohup $command >> \" $log \" 2>&1 < /dev/null &"
127+ local command=" $@ "
128+ if [ -z ${SPARK_NO_DAEMONIZE+set} ]; then
129+ nohup -- $command >> $log 2>&1 < /dev/null &
132130 newpid=" $! "
133131
134132 echo " $newpid " > " $pid "
@@ -149,6 +147,8 @@ execute_command() {
149147 tail -2 " $log " | sed ' s/^/ /'
150148 echo " full log in $log "
151149 fi
150+ else
151+ $command
152152 fi
153153}
154154
@@ -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 \" \" ${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 (* )
You can’t perform that action at this time.
0 commit comments