6
6
7
7
get_abs_script_path () {
8
8
pushd . > /dev/null
9
- cd $( dirname $0 )
9
+ cd " $( dirname " $0 " ) "
10
10
appdir=$( pwd)
11
11
popd > /dev/null
12
12
}
@@ -26,14 +26,14 @@ JAVA_OPTS="-XX:MaxDirectMemorySize=512M
26
26
27
27
MAIN=" spark.jobserver.JobServer"
28
28
29
- conffile=$( ls -1 $appdir /* .conf | head -1)
29
+ conffile=" $( ls -1 " $appdir " /* .conf | head -1) "
30
30
if [ -z " $conffile " ]; then
31
31
echo " No configuration file found"
32
32
exit 1
33
33
fi
34
34
35
35
if [ -f " $appdir /settings.sh" ]; then
36
- . $appdir /settings.sh
36
+ . " $appdir /settings.sh"
37
37
else
38
38
echo " Missing $appdir /settings.sh, exiting"
39
39
exit 1
46
46
47
47
pidFilePath=$appdir /$PIDFILE
48
48
49
- if [ -f " $pidFilePath " ] && kill -0 $( cat " $pidFilePath " ) ; then
49
+ if [ -f " $pidFilePath " ] && kill -0 " $( cat " $pidFilePath " ) " ; then
50
50
echo ' Job server is already running'
51
51
exit 1
52
52
fi
@@ -57,8 +57,9 @@ if [ -z "$LOG_DIR" ]; then
57
57
fi
58
58
mkdir -p $LOG_DIR
59
59
60
- LOGGING_OPTS=" -Dlog4j.configuration=file:$appdir /log4j-server.properties
61
- -DLOG_DIR=$LOG_DIR "
60
+ LOGGING_OPTS=" -DLOG_DIR=$LOG_DIR "
61
+
62
+ export SPARK_SUBMIT_LOGBACK_CONF_FILE=" $appdir /logback-server.xml"
62
63
63
64
# For Mesos
64
65
CONFIG_OVERRIDES=" "
78
79
export SPARK_HOME
79
80
80
81
# DSE_BIN is set in settings.sh
81
- $DSE_HOME /bin/dse spark-submit --class $MAIN --driver-memory 5G \
82
+ " $DSE_HOME /bin/dse" spark-submit --class " $MAIN " --driver-memory 5G \
82
83
--conf " spark.executor.extraJavaOptions=$LOGGING_OPTS " \
83
84
--driver-java-options " $GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES " \
84
- $@ $appdir /spark-job-server.jar $conffile 2>&1 &
85
- echo $! > $pidFilePath
85
+ " $@ " " $appdir /spark-job-server.jar" " $conffile " 2>&1 &
86
+ echo " $! " > " $pidFilePath "
0 commit comments