aboutsummaryrefslogtreecommitdiff
path: root/make-distribution.sh
diff options
context:
space:
mode:
Diffstat (limited to 'make-distribution.sh')
-rwxr-xr-xmake-distribution.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/make-distribution.sh b/make-distribution.sh
index dc8aa56a2e..2ab64ff459 100755
--- a/make-distribution.sh
+++ b/make-distribution.sh
@@ -51,6 +51,20 @@ if [ $? != 0 ]; then
exit -1;
fi
+if [ -z "${JAVA_HOME}" ]; then
+ echo "Error: JAVA_HOME is not set, cannot proceed."
+ exit -1
+fi
+
+JAVA_CMD=$JAVA_HOME/bin/java
+JAVA_VERSION=$($JAVA_CMD -version 2>&1)
+if ! [[ "$JAVA_VERSION" =~ "1.6" ]]; then
+ echo "Error: JAVA_HOME must point to a JDK 6 installation (see SPARK-1703)."
+ echo "Output from 'java -version' was:"
+ echo "$JAVA_VERSION"
+ exit -1
+fi
+
# Initialize defaults
SPARK_HADOOP_VERSION=1.0.4
SPARK_YARN=false