From 5cb6f7da65c8f6f5dbd04f6b74160b9ca2ca7427 Mon Sep 17 00:00:00 2001 From: Prashant Sharma Date: Thu, 12 Jun 2014 19:34:18 +0530 Subject: [PATCH 1/2] [SPARK-2118] spark class should complaing if tools jar is missing. --- bin/spark-class | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/spark-class b/bin/spark-class index cfe363a71da31..cecba88278eed 100755 --- a/bin/spark-class +++ b/bin/spark-class @@ -130,6 +130,13 @@ else fi if [[ "$1" =~ org.apache.spark.tools.* ]]; then + if test -z "$SPARK_TOOLS_JAR"; then + cat <&2 +Failed to find Spark Tools Jar in $FWDIR/tools/target/scala-$SCALA_VERSION/ +You need to build spark before running $1. +EOF + exit 1 + fi CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR" fi From 29e768b92e19a44de1687edffb5e3d3ffbe44b8e Mon Sep 17 00:00:00 2001 From: Prashant Sharma Date: Mon, 23 Jun 2014 19:16:47 +0530 Subject: [PATCH 2/2] Code Review --- bin/spark-class | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/spark-class b/bin/spark-class index cecba88278eed..60d9657c0ffcd 100755 --- a/bin/spark-class +++ b/bin/spark-class @@ -131,12 +131,10 @@ fi if [[ "$1" =~ org.apache.spark.tools.* ]]; then if test -z "$SPARK_TOOLS_JAR"; then - cat <&2 -Failed to find Spark Tools Jar in $FWDIR/tools/target/scala-$SCALA_VERSION/ -You need to build spark before running $1. -EOF - exit 1 - fi + echo "Failed to find Spark Tools Jar in $FWDIR/tools/target/scala-$SCALA_VERSION/" 1>&2 + echo "You need to build spark before running $1." 1>&2 + exit 1 + fi CLASSPATH="$CLASSPATH:$SPARK_TOOLS_JAR" fi