Skip to content

Commit 3231ba7

Browse files
committed
DSP-15163 use dse script to start context in separate jvm
Dse script is used for manager-start-cmd because it is easily reachable by spark jobserver. Original value for manager-start-cmd is ./manager_start.sh which ends in file not found error. Providing full path to config file would introduce unnecessary complexity. Context-per-jvm share logging configuration with spark jobserver instance. However logging dir is different, every context-per-jvm instance have it's own logging directory.
1 parent 507a330 commit 3231ba7

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

bin/manager_start.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ get_abs_script_path
1313

1414
. $appdir/setenv.sh
1515

16+
# Override logging options to provide per-context logging
17+
LOGGING_OPTS="$LOGGING_OPTS_FILE
18+
-DLOG_DIR=$5"
19+
1620
GC_OPTS="-XX:+UseConcMarkSweepGC
1721
-verbose:gc -XX:+PrintGCTimeStamps
1822
-XX:MaxPermSize=512m
@@ -31,7 +35,6 @@ if [ $2 = "cluster" -a -z "$REMOTE_JOBSERVER_DIR" ]; then
3135
--files $appdir/log4j-cluster.properties,$conffile"
3236
JAR_FILE="$appdir/spark-job-server.jar"
3337
CONF_FILE=$(basename $conffile)
34-
LOGGING_OPTS="-Dlog4j.configuration=log4j-cluster.properties"
3538

3639
# use files in REMOTE_JOBSERVER_DIR
3740
elif [ $2 == "cluster" ]; then
@@ -40,13 +43,11 @@ elif [ $2 == "cluster" ]; then
4043
--conf spark.yarn.submit.waitAppCompletion=false"
4144
JAR_FILE="$REMOTE_JOBSERVER_DIR/spark-job-server.jar"
4245
CONF_FILE="$REMOTE_JOBSERVER_DIR/$(basename $conffile)"
43-
LOGGING_OPTS="-Dlog4j.configuration=$REMOTE_JOBSERVER_DIR/log4j-cluster.properties"
4446

4547
# client mode, use files from app dir
4648
else
4749
JAR_FILE="$appdir/spark-job-server.jar"
4850
CONF_FILE="$conffile"
49-
LOGGING_OPTS="-Dlog4j.configuration=file:$appdir/log4j-server.properties -DLOG_DIR=$5"
5051
GC_OPTS="$GC_OPTS -Xloggc:$5/gc.out"
5152
fi
5253

bin/setenv.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ if [ -z "$LOG_DIR" ]; then
5353
fi
5454
mkdir -p $LOG_DIR
5555

56-
LOGGING_OPTS="-Dlogback.configurationFile=file:$appdir/logback-server.xml
57-
-DLOG_DIR=$LOG_DIR"
56+
# used in server_start and in manager_start
57+
LOGGING_OPTS_FILE="-Dlogback.configurationFile=file:$appdir/logback-server.xml"
58+
59+
LOGGING_OPTS="$LOGGING_OPTS_FILE -DLOG_DIR=$LOG_DIR"
5860

5961
if [ -z "$JMX_PORT" ]; then
6062
JMX_PORT=9999

job-server/config/dse.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ spark {
4949

5050
# Note that you can use this file to define settings not only for job server,
5151
# but for your Spark jobs as well. Spark job configuration merges with this configuration file as defaults.
52+
53+
54+
deploy {
55+
manager-start-cmd = "dse spark-jobserver context-per-jvm-managed-start"
56+
}

0 commit comments

Comments
 (0)