aboutsummaryrefslogtreecommitdiff
path: root/pyspark
diff options
context:
space:
mode:
authorMatei Zaharia <matei@eecs.berkeley.edu>2013-01-17 11:14:47 -0800
committerMatei Zaharia <matei@eecs.berkeley.edu>2013-01-17 11:14:47 -0800
commit892c32a14b89139b7bd89e141fc90b148a67ce68 (patch)
treecb9d0516123de7be8e93277b5b6ef5dfd93d62ae /pyspark
parent4beb084f6468ff738a0c267dd798d95011c88321 (diff)
downloadspark-892c32a14b89139b7bd89e141fc90b148a67ce68.tar.gz
spark-892c32a14b89139b7bd89e141fc90b148a67ce68.tar.bz2
spark-892c32a14b89139b7bd89e141fc90b148a67ce68.zip
Warn users if they run pyspark or spark-shell without compiling Spark
Diffstat (limited to 'pyspark')
-rwxr-xr-xpyspark7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyspark b/pyspark
index 9e89d51ba2..ab7f4f50c0 100755
--- a/pyspark
+++ b/pyspark
@@ -6,6 +6,13 @@ FWDIR="$(cd `dirname $0`; pwd)"
# Export this as SPARK_HOME
export SPARK_HOME="$FWDIR"
+# Exit if the user hasn't compiled Spark
+if [ ! -e "$SPARK_HOME/repl/target" ]; then
+ echo "Failed to find Spark classes in $SPARK_HOME/repl/target" >&2
+ echo "You need to compile Spark before running this program" >&2
+ exit 1
+fi
+
# Load environment variables from conf/spark-env.sh, if it exists
if [ -e $FWDIR/conf/spark-env.sh ] ; then
. $FWDIR/conf/spark-env.sh