Skip to content

Commit

Permalink
Merge pull request #17 from riptano/DSP-15163-dse-2.2
Browse files Browse the repository at this point in the history
DSP-15163 use dse script to start context in separate jvm
  • Loading branch information
jtgrabowski authored Feb 25, 2018
2 parents 507a330 + 36aa91a commit 0c5b322
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
7 changes: 4 additions & 3 deletions bin/manager_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ get_abs_script_path

. $appdir/setenv.sh

# Override logging options to provide per-context logging
LOGGING_OPTS="$LOGGING_OPTS_FILE
-DLOG_DIR=$5"

GC_OPTS="-XX:+UseConcMarkSweepGC
-verbose:gc -XX:+PrintGCTimeStamps
-XX:MaxPermSize=512m
Expand All @@ -31,7 +35,6 @@ if [ $2 = "cluster" -a -z "$REMOTE_JOBSERVER_DIR" ]; then
--files $appdir/log4j-cluster.properties,$conffile"
JAR_FILE="$appdir/spark-job-server.jar"
CONF_FILE=$(basename $conffile)
LOGGING_OPTS="-Dlog4j.configuration=log4j-cluster.properties"

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

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

Expand Down
6 changes: 4 additions & 2 deletions bin/setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ if [ -z "$LOG_DIR" ]; then
fi
mkdir -p $LOG_DIR

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

LOGGING_OPTS="$LOGGING_OPTS_FILE -DLOG_DIR=$LOG_DIR"

if [ -z "$JMX_PORT" ]; then
JMX_PORT=9999
Expand Down
5 changes: 5 additions & 0 deletions job-server/config/dse.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ spark {

# Note that you can use this file to define settings not only for job server,
# but for your Spark jobs as well. Spark job configuration merges with this configuration file as defaults.


deploy {
manager-start-cmd = "dse spark-jobserver context-per-jvm-managed-start"
}
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class AkkaClusterSupervisorActor(daoActor: ActorRef, dataManagerActor: ActorRef)
}

val contextLogger = LoggerFactory.getLogger("manager_start")
val process = Process(managerStartCommand, managerArgs)
val process = Process(managerStartCommand.split(" ") ++ managerArgs)
process.run(ProcessLogger(out => contextLogger.info(out), err => contextLogger.warn(err)))

contextInitInfos(contextActorName) = (mergedContextConfig, isAdHoc, successFunc, failureFunc)
Expand Down

0 comments on commit 0c5b322

Please sign in to comment.