diff options
author | Prashant Sharma <prashant.s@imaginea.com> | 2014-07-03 15:06:58 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-07-03 15:06:58 -0700 |
commit | 731f683b1bd8abbb83030b6bae14876658bbf098 (patch) | |
tree | 729c971a4dd31818da07b8cec4d69d7d7fa9104d /bin/spark-class | |
parent | a9b52e5623f7fc77fca96b095f9eeaef76e35d54 (diff) | |
download | spark-731f683b1bd8abbb83030b6bae14876658bbf098.tar.gz spark-731f683b1bd8abbb83030b6bae14876658bbf098.tar.bz2 spark-731f683b1bd8abbb83030b6bae14876658bbf098.zip |
[SPARK-2109] Setting SPARK_MEM for bin/pyspark does not work.
Trivial fix.
Author: Prashant Sharma <prashant.s@imaginea.com>
Closes #1050 from ScrapCodes/SPARK-2109/pyspark-script-bug and squashes the following commits:
77072b9 [Prashant Sharma] Changed echos to redirect to STDERR.
13f48a0 [Prashant Sharma] [SPARK-2109] Setting SPARK_MEM for bin/pyspark does not work.
Diffstat (limited to 'bin/spark-class')
-rwxr-xr-x | bin/spark-class | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/spark-class b/bin/spark-class index 60d9657c0f..04fa52c675 100755 --- a/bin/spark-class +++ b/bin/spark-class @@ -33,13 +33,13 @@ export SPARK_HOME="$FWDIR" . $FWDIR/bin/load-spark-env.sh if [ -z "$1" ]; then - echo "Usage: spark-class <class> [<args>]" >&2 + echo "Usage: spark-class <class> [<args>]" 1>&2 exit 1 fi if [ -n "$SPARK_MEM" ]; then - echo "Warning: SPARK_MEM is deprecated, please use a more specific config option" - echo "(e.g., spark.executor.memory or SPARK_DRIVER_MEMORY)." + echo -e "Warning: SPARK_MEM is deprecated, please use a more specific config option" 1>&2 + echo -e "(e.g., spark.executor.memory or SPARK_DRIVER_MEMORY)." 1>&2 fi # Use SPARK_MEM or 512m as the default memory, to be overridden by specific options @@ -147,10 +147,9 @@ fi export CLASSPATH if [ "$SPARK_PRINT_LAUNCH_COMMAND" == "1" ]; then - echo -n "Spark Command: " - echo "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@" - echo "========================================" - echo + echo -n "Spark Command: " 1>&2 + echo "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@" 1>&2 + echo -e "========================================\n" 1>&2 fi exec "$RUNNER" -cp "$CLASSPATH" $JAVA_OPTS "$@" |