Skip to content

Commit

Permalink
Use wget instead of axel, fix Spark env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
umayrh committed Jan 28, 2019
1 parent 642d507 commit 5fd551d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/travis-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,19 @@ bootstrapLinux() {
setupSpark() {
local SPARK_DIR_NAME=spark-${SPARK_VERSION}
SPARK_DIST_NAME=${SPARK_DIR_NAME}-bin-hadoop${HADOOP_VERSION}
if [[ ! -d "$HOME/.cache/${SPARK_DIR_NAME}" ]]; then
if [[ ! -d "$HOME/.cache/${SPARK_DIST_NAME}" ]]; then
cd $HOME/.cache
rm -fr ./${SPARK_DIST_NAME}.tgz*
axel --quiet http://www-us.apache.org/dist/spark/${SPARK_DIR_NAME}/${SPARK_DIST_NAME}.tgz
ls -alh ${SPARK_DIR_NAME}/${SPARK_DIST_NAME}.tgz
# Use axel again whe https://github.com/axel-download-accelerator/axel/issues/133
# has been fixed.
# axel --quiet http://www-us.apache.org/dist/spark/${SPARK_DIR_NAME}/${SPARK_DIST_NAME}.tgz
wget --quiet http://www-us.apache.org/dist/spark/${SPARK_DIR_NAME}/${SPARK_DIST_NAME}.tgz
ls -alh ${SPARK_DIST_NAME}.tgz
tar -xf ./${SPARK_DIST_NAME}.tgz
# TODO: need a more systematic method for setting up Spark properties
cd ..
fi
export SPARK_HOME="${HOME}/.cache/${SPARK_DIR_NAME}"
export SPARK_HOME="${HOME}/.cache/${SPARK_DIST_NAME}"
echo "spark.yarn.jars=${SPARK_HOME}/jars/*.jar" > ${SPARK_HOME}/conf/spark-defaults.conf
}

Expand Down

0 comments on commit 5fd551d

Please sign in to comment.