Skip to content
Snippets Groups Projects
Commit 892c32a1 authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Warn users if they run pyspark or spark-shell without compiling Spark

parent 4beb084f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -65,6 +65,13 @@ EXAMPLES_DIR="$FWDIR/examples"
BAGEL_DIR="$FWDIR/bagel"
PYSPARK_DIR="$FWDIR/python"
# Exit if the user hasn't compiled Spark
if [ ! -e "$REPL_DIR/target" ]; then
echo "Failed to find Spark classes in $REPL_DIR/target" >&2
echo "You need to compile Spark before running this program" >&2
exit 1
fi
# Build up classpath
CLASSPATH="$SPARK_CLASSPATH"
CLASSPATH+=":$FWDIR/conf"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment