From c842b1f234f71efa70a3789d52bf8b336f91095b 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 | 9 ++++++++- bin/server_start.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/manager_start.sh b/bin/manager_start.sh index 813e6095d..116c16e5d 100755 --- a/bin/manager_start.sh +++ b/bin/manager_start.sh @@ -55,12 +55,19 @@ if [ -n "$6" ]; then SPARK_SUBMIT_OPTIONS="$SPARK_SUBMIT_OPTIONS --proxy-user $6" fi +if [ "$SEPARATE_EXECUTOR_LOGGING" = "true" ] +then + export EXECUTOR_LOGGING_OPTS="" +else + export EXECUTOR_LOGGING_OPTS="$LOGGING_OPTS" +fi + if [ -n "$JOBSERVER_KEYTAB" ]; then SPARK_SUBMIT_OPTIONS="$SPARK_SUBMIT_OPTIONS --keytab $JOBSERVER_KEYTAB" fi cmd='$SPARK_HOME/bin/spark-submit --class $MAIN --driver-memory $JOBSERVER_MEMORY - --conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" + --conf "spark.executor.extraJavaOptions=$EXECUTOR_LOGGING_OPTS" $SPARK_SUBMIT_OPTIONS --driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES $SPARK_SUBMIT_JAVA_OPTIONS" $JAR_FILE $3 $4 $CONF_FILE' diff --git a/bin/server_start.sh b/bin/server_start.sh index 8fdd6bc53..8f0450443 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 + export EXECUTOR_LOGGING_OPTS="" +else + export EXECUTOR_LOGGING_OPTS="$LOGGING_OPTS" +fi + cmd='$SPARK_HOME/bin/spark-submit --class $MAIN --driver-memory $JOBSERVER_MEMORY - --conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" + --conf "spark.executor.extraJavaOptions=$EXECUTOR_LOGGING_OPTS" --driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES" $@ $appdir/spark-job-server.jar $conffile'