aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2013-08-02 16:58:19 -0700
committerPatrick Wendell <pwendell@gmail.com>2013-08-02 16:58:19 -0700
commitb4905c383bf24143966d8b2d0ae69ef9ee7c3b0e (patch)
tree033b2558dfe27ffa966e917f0b7f9c132799981a /run
parent9d7dfd2d5a28c3e329fe14cf10f5184af1263dd6 (diff)
downloadspark-b4905c383bf24143966d8b2d0ae69ef9ee7c3b0e.tar.gz
spark-b4905c383bf24143966d8b2d0ae69ef9ee7c3b0e.tar.bz2
spark-b4905c383bf24143966d8b2d0ae69ef9ee7c3b0e.zip
Log the launch command for Spark daemons
For debugging and analysis purposes, it's nice to have the exact command used to launch Spark contained within the logs. This adds the necessary hooks to make that possible.
Diffstat (limited to 'run')
-rwxr-xr-xrun10
1 files changed, 9 insertions, 1 deletions
diff --git a/run b/run
index 0a440627a1..8bbde1a027 100755
--- a/run
+++ b/run
@@ -164,4 +164,12 @@ else
# The JVM doesn't read JAVA_OPTS by default so we need to pass it in
EXTRA_ARGS="$JAVA_OPTS"
fi
-exec "$RUNNER" -cp "$CLASSPATH" $EXTRA_ARGS "$@"
+
+command="$RUNNER -cp \"$CLASSPATH\" $EXTRA_ARGS $@"
+if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then
+ echo "Spark Command: $command"
+ echo "======================================"
+ echo
+fi
+
+exec $command