Skip to content
Snippets Groups Projects
Commit 39b8b148 authored by Patrick Wendell's avatar Patrick Wendell
Browse files

SPARK-1737: Warn rather than fail when Java 7+ is used to create distributions

Also moves a few lines of code around in make-distribution.sh.

Author: Patrick Wendell <pwendell@gmail.com>

Closes #669 from pwendell/make-distribution and squashes the following commits:

8bfac49 [Patrick Wendell] Small fix
46918ec [Patrick Wendell] SPARK-1737: Warn rather than fail when Java 7+ is used to create distributions.
parent 951a5d93
No related branches found
No related tags found
No related merge requests found
...@@ -39,18 +39,11 @@ ...@@ -39,18 +39,11 @@
# 5) ./bin/spark-shell --master spark://my-master-ip:7077 # 5) ./bin/spark-shell --master spark://my-master-ip:7077
# #
set -o pipefail
# Figure out where the Spark framework is installed # Figure out where the Spark framework is installed
FWDIR="$(cd `dirname $0`; pwd)" FWDIR="$(cd `dirname $0`; pwd)"
DISTDIR="$FWDIR/dist" DISTDIR="$FWDIR/dist"
set -o pipefail
VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1)
if [ $? != 0 ]; then
echo -e "You need Maven installed to build Spark."
echo -e "Download Maven from https://maven.apache.org/"
exit -1;
fi
if [ -z "$JAVA_HOME" ]; then if [ -z "$JAVA_HOME" ]; then
echo "Error: JAVA_HOME is not set, cannot proceed." echo "Error: JAVA_HOME is not set, cannot proceed."
exit -1 exit -1
...@@ -59,10 +52,17 @@ fi ...@@ -59,10 +52,17 @@ fi
JAVA_CMD="$JAVA_HOME"/bin/java JAVA_CMD="$JAVA_HOME"/bin/java
JAVA_VERSION=$("$JAVA_CMD" -version 2>&1) JAVA_VERSION=$("$JAVA_CMD" -version 2>&1)
if ! [[ "$JAVA_VERSION" =~ "1.6" ]]; then if ! [[ "$JAVA_VERSION" =~ "1.6" ]]; then
echo "Error: JAVA_HOME must point to a JDK 6 installation (see SPARK-1703)." echo "***NOTE***: JAVA_HOME is not set to a JDK 6 installation. The resulting"
echo " distribution will not support Java 6. See SPARK-1703."
echo "Output from 'java -version' was:" echo "Output from 'java -version' was:"
echo "$JAVA_VERSION" echo "$JAVA_VERSION"
exit -1 fi
VERSION=$(mvn help:evaluate -Dexpression=project.version 2>/dev/null | grep -v "INFO" | tail -n 1)
if [ $? != 0 ]; then
echo -e "You need Maven installed to build Spark."
echo -e "Download Maven from https://maven.apache.org/"
exit -1;
fi fi
# Initialize defaults # Initialize defaults
......
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