diff options
author | Raymond Liu <raymond.liu@intel.com> | 2013-11-12 15:14:21 +0800 |
---|---|---|
committer | Raymond Liu <raymond.liu@intel.com> | 2013-11-13 16:55:11 +0800 |
commit | 0f2e3c6e31d56c627ff81cdc93289a7c7cb2ec16 (patch) | |
tree | 60f01110b170ff72347e1ae6209f898712578ed3 /spark-class | |
parent | 5429d62dfa16305eb23d67dfe38172803c80db65 (diff) | |
parent | 3d4ad84b63e440fd3f4b3edb1b120ff7c14a42d1 (diff) | |
download | spark-0f2e3c6e31d56c627ff81cdc93289a7c7cb2ec16.tar.gz spark-0f2e3c6e31d56c627ff81cdc93289a7c7cb2ec16.tar.bz2 spark-0f2e3c6e31d56c627ff81cdc93289a7c7cb2ec16.zip |
Merge branch 'master' into scala-2.10
Diffstat (limited to 'spark-class')
-rwxr-xr-x | spark-class | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/spark-class b/spark-class index 5305b3d025..359db3d984 100755 --- a/spark-class +++ b/spark-class @@ -95,10 +95,17 @@ export JAVA_OPTS if [ ! -f "$FWDIR/RELEASE" ]; then # Exit if the user hasn't compiled Spark - ls "$FWDIR"/assembly/target/scala-$SCALA_VERSION/spark-assembly*hadoop*.jar >& /dev/null - if [[ $? != 0 ]]; then - echo "Failed to find Spark assembly in $FWDIR/assembly/target" >&2 - echo "You need to build Spark with sbt/sbt assembly before running this program" >&2 + num_jars=$(ls "$FWDIR"/assembly/target/scala-$SCALA_VERSION/ | grep "spark-assembly.*hadoop.*.jar" | wc -l) + jars_list=$(ls "$FWDIR"/assembly/target/scala-$SCALA_VERSION/ | grep "spark-assembly.*hadoop.*.jar") + if [ "$num_jars" -eq "0" ]; then + echo "Failed to find Spark assembly in $FWDIR/assembly/target/scala-$SCALA_VERSION/" >&2 + echo "You need to build Spark with 'sbt/sbt assembly' before running this program." >&2 + exit 1 + fi + if [ "$num_jars" -gt "1" ]; then + echo "Found multiple Spark assembly jars in $FWDIR/assembly/target/scala-$SCALA_VERSION:" >&2 + echo "$jars_list" + echo "Please remove all but one jar." exit 1 fi fi |