From edb11ecdd3e939ac74036dfb7207987000ac4357 Mon Sep 17 00:00:00 2001 From: Alex Liu Date: Fri, 6 Dec 2019 14:33:34 -0500 Subject: [PATCH] DSP-19969 allow spark executor log to separate file --- bin/manager_start.sh | 11 +++++++++-- bin/server_start.sh | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/bin/manager_start.sh b/bin/manager_start.sh index 2ff70277e..b4715bc2a 100755 --- a/bin/manager_start.sh +++ b/bin/manager_start.sh @@ -27,15 +27,22 @@ JAVA_OPTS="-XX:MaxDirectMemorySize=$MAX_DIRECT_MEMORY MAIN="spark.jobserver.JobManager" +if [ "$SEPARATE_EXECUTOR_LOGGING" = "true" ] +then + EXECUTOR_SETTING="" +else + EXECUTOR_SETTING="--conf spark.executor.extraJavaOptions=$LOGGING_OPTS" +fi + if [ ! -z $3 ]; then cmd='$SPARK_HOME/bin/spark-submit --class $MAIN --driver-memory $JOBSERVER_MEMORY - --conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" + $EXECUTOR_SETTING --proxy-user $3 --driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES" $appdir/spark-job-server.jar $1 $2 $conffile' else cmd='$SPARK_HOME/bin/spark-submit --class $MAIN --driver-memory $JOBSERVER_MEMORY - --conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" + $EXECUTOR_SETTING --driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES" $appdir/spark-job-server.jar $1 $2 $conffile' fi diff --git a/bin/server_start.sh b/bin/server_start.sh index 8fdd6bc53..06a0971bf 100755 --- a/bin/server_start.sh +++ b/bin/server_start.sh @@ -43,8 +43,15 @@ if [ -f "$PIDFILE" ] && kill -0 $(cat "$PIDFILE"); then exit 1 fi +if [ "$SEPARATE_EXECUTOR_LOGGING" = "true" ] +then + EXECUTOR_SETTING="" +else + EXECUTOR_SETTING="--conf spark.executor.extraJavaOptions=$LOGGING_OPTS" +fi + cmd='$SPARK_HOME/bin/spark-submit --class $MAIN --driver-memory $JOBSERVER_MEMORY - --conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" + $EXECUTOR_SETTING --driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES" $@ $appdir/spark-job-server.jar $conffile'