Skip to content

Commit 8ad9f95

Browse files
generalization
1 parent 598e21e commit 8ad9f95

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sbin/spark-daemon.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ then
6262
shift
6363
fi
6464

65-
startStop=$1
65+
option=$1
6666
shift
6767
command=$1
6868
shift
@@ -122,9 +122,9 @@ if [ "$SPARK_NICENESS" = "" ]; then
122122
fi
123123

124124

125-
case $startStop in
125+
case $option in
126126

127-
(start)
127+
(start|spark-submit)
128128

129129
mkdir -p "$SPARK_PID_DIR"
130130

@@ -142,7 +142,7 @@ case $startStop in
142142

143143
spark_rotate_log "$log"
144144
echo starting $command, logging to $log
145-
if [ $command == "org.apache.spark.sql.hive.thriftserver.HiveThriftServer2" ]; then
145+
if [ $option == spark-submit ]; then
146146
nohup nice -n $SPARK_NICENESS "$SPARK_PREFIX"/bin/spark-submit --class $command \
147147
"${SUBMISSION_OPTS[@]}" spark-internal "${APPLICATION_OPTS[@]}" >> "$log" 2>&1 < /dev/null &
148148
else

sbin/start-thriftserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ source "$FWDIR"/bin/utils.sh
5252
SUBMIT_USAGE_FUNCTION=usage
5353
gatherSparkSubmitOpts "$@"
5454

55-
exec "$FWDIR"/sbin/spark-daemon.sh start $CLASS 1 "${SUBMISSION_OPTS[@]}" spark-internal "${APPLICATION_OPTS[@]}"
55+
. "$FWDIR"/sbin/spark-daemon.sh spark-submit $CLASS 1

0 commit comments

Comments
 (0)