You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@predictionio.apache.org by do...@apache.org on 2018/08/31 22:34:01 UTC
predictionio git commit: Switch between mirror and archive
Repository: predictionio
Updated Branches:
refs/heads/feature/PIO-61 2e45c0e4a -> fe7e01e9e
Switch between mirror and archive
Project: http://git-wip-us.apache.org/repos/asf/predictionio/repo
Commit: http://git-wip-us.apache.org/repos/asf/predictionio/commit/fe7e01e9
Tree: http://git-wip-us.apache.org/repos/asf/predictionio/tree/fe7e01e9
Diff: http://git-wip-us.apache.org/repos/asf/predictionio/diff/fe7e01e9
Branch: refs/heads/feature/PIO-61
Commit: fe7e01e9e2fd84726a85778b1037113b45162a41
Parents: 2e45c0e
Author: Donald Szeto <do...@apache.org>
Authored: Fri Aug 31 15:33:49 2018 -0700
Committer: Donald Szeto <do...@apache.org>
Committed: Fri Aug 31 15:33:49 2018 -0700
----------------------------------------------------------------------
conf/pio-vendors.sh | 11 ++++++++++-
tests/build_docker.sh | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/predictionio/blob/fe7e01e9/conf/pio-vendors.sh
----------------------------------------------------------------------
diff --git a/conf/pio-vendors.sh b/conf/pio-vendors.sh
index 6420207..052d84c 100644
--- a/conf/pio-vendors.sh
+++ b/conf/pio-vendors.sh
@@ -19,6 +19,11 @@
# IMPORTANT: PIO_*_VERSION for dependencies must be set before envoking this script.
# `source conf/set_build_profile.sh $BUILD_PROFILE` to get the proper versions
+# Figure out current script's location
+THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+. $THIS_SCRIPT_DIR/../bin/semver.sh
+
if [ -z "$PIO_SCALA_VERSION" ]; then
PIO_SCALA_VERSION="2.11.8"
fi
@@ -51,7 +56,11 @@ PGSQL_DOWNLOAD=https://jdbc.postgresql.org/download/${PGSQL_JAR}
HADOOP_MAJOR=`echo $PIO_HADOOP_VERSION | awk -F. '{print $1 "." $2}'`
SPARK_DIR=spark-${PIO_SPARK_VERSION}-bin-hadoop${HADOOP_MAJOR}
SPARK_ARCHIVE=${SPARK_DIR}.tgz
-SPARK_DOWNLOAD=http://d3kbcqa49mib13.cloudfront.net/${SPARK_ARCHIVE}
+if semverGT $PIO_SPARK_VERSION "2.1.2"; then
+ SPARK_DOWNLOAD=https://www.apache.org/dyn/closer.lua\?action=download\&filename=spark/spark-${PIO_SPARK_VERSION}/${SPARK_ARCHIVE}
+else
+ SPARK_DOWNLOAD=https://archive.apache.org/dist/spark/spark-${PIO_SPARK_VERSION}/${SPARK_ARCHIVE}
+fi
# ELASTICSEARCH_DOWNLOAD
# 5.x https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${PIO_ELASTICSEARCH_VERSION}.tar.gz
# 1.x https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${PIO_ELASTICSEARCH_VERSION}.tar.gz
http://git-wip-us.apache.org/repos/asf/predictionio/blob/fe7e01e9/tests/build_docker.sh
----------------------------------------------------------------------
diff --git a/tests/build_docker.sh b/tests/build_docker.sh
index b17a304..2c27719 100755
--- a/tests/build_docker.sh
+++ b/tests/build_docker.sh
@@ -28,7 +28,7 @@ if [ ! -f $DIR/docker-files/${PGSQL_JAR} ]; then
mv ${PGSQL_JAR} $DIR/docker-files/
fi
if [ ! -f $DIR/docker-files/${SPARK_ARCHIVE} ]; then
- wget $SPARK_DOWNLOAD
+ wget -O $SPARK_ARCHIVE $SPARK_DOWNLOAD
mv $SPARK_ARCHIVE $DIR/docker-files/
fi