mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
enable travis for livy integration test
This commit is contained in:
parent
798de1bb55
commit
995ddf3627
2 changed files with 87 additions and 0 deletions
|
|
@ -74,6 +74,10 @@ matrix:
|
|||
- jdk: "oraclejdk7"
|
||||
env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.0.0" HADOOP_VER="2.3" PROFILE="-Pspark-2.0 -Phadoop-2.3 -Ppyspark -Pscala-2.11" BUILD_FLAG="package -pl spark,python -am -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl zeppelin-interpreter,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.spark.PySpark*Test,org.apache.zeppelin.python.* -Dpyspark.test.exclude='' -DfailIfNoTests=false"
|
||||
|
||||
# Test livy with spark 1.5.2 and hadoop 2.6
|
||||
- jdk: "oraclejdk7"
|
||||
env: SCALA_VER="2.10" SPARK_VER="1.5.2" HADOOP_VER="2.6" PROFILE="-Pspark-1.5 -Phadoop-2.6" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl livy -DfailIfNoTests=false"
|
||||
|
||||
before_install:
|
||||
- echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=warn'" >> ~/.mavenrc
|
||||
- ./testing/install_external_dependencies.sh > /dev/null 2>&1
|
||||
|
|
@ -88,6 +92,7 @@ install:
|
|||
|
||||
before_script:
|
||||
- travis_retry ./testing/downloadSpark.sh $SPARK_VER $HADOOP_VER
|
||||
- if [[ -n $LIVY_VER ]]; then travis_retry ./testing/downloadLivy.sh $LIVY_VER; fi
|
||||
- echo "export SPARK_HOME=`pwd`/spark-$SPARK_VER-bin-hadoop$HADOOP_VER" > conf/zeppelin-env.sh
|
||||
- tail conf/zeppelin-env.sh
|
||||
|
||||
|
|
|
|||
82
testing/downloadLivy.sh
Executable file
82
testing/downloadLivy.sh
Executable file
|
|
@ -0,0 +1,82 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
if [[ "$#" -ne 1 ]]; then
|
||||
echo "usage) $0 [livy version]"
|
||||
echo " eg) $0 0.2"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LIVY_VERSION="${1}"
|
||||
|
||||
set -xe
|
||||
|
||||
MAX_DOWNLOAD_TIME_SEC=590
|
||||
FWDIR="$(dirname "${BASH_SOURCE-$0}")"
|
||||
ZEPPELIN_HOME="$(cd "${FWDIR}/.."; pwd)"
|
||||
|
||||
#######################################
|
||||
# Downloads file from the givrn URL.
|
||||
# Ties 3 times with 1s delay, 20s read and 15s connection timeouts.
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# url - source URL
|
||||
# Returns:
|
||||
# None
|
||||
#######################################
|
||||
download_with_retry() {
|
||||
local url="$1"
|
||||
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 3 "${url}"
|
||||
if [[ "$?" -ne 0 ]]; then
|
||||
echo "3 download attempts for ${url} failed"
|
||||
fi
|
||||
}
|
||||
|
||||
LIVY_CACHE=".livy-dist"
|
||||
LIVY_ARCHIVE="v${LIVY_VERSION}"
|
||||
export LIVY_HOME="${ZEPPELIN_HOME}/${LIVY_ARCHIVE}"
|
||||
echo "LIVY_HOME is ${LIVY_HOME}"
|
||||
|
||||
if [[ ! -d "${LIVY_HOME}" ]]; then
|
||||
mkdir -p "${LIVY_CACHE}"
|
||||
cd "${LIVY_CACHE}"
|
||||
if [[ ! -f "${LIVY_ARCHIVE}.tar.gz" ]]; then
|
||||
pwd
|
||||
ls -la .
|
||||
echo "${LIVY_CACHE} does not have ${LIVY_ARCHIVE} downloading ..."
|
||||
|
||||
# download livy from archive if not cached
|
||||
echo "${LIVY_VERSION} being downloaded from archives"
|
||||
STARTTIME=`date +%s`
|
||||
download_with_retry "https://github.com/cloudera/livy/archive/${LIVY_ARCHIVE}.tgz"
|
||||
ENDTIME=`date +%s`
|
||||
DOWNLOADTIME="$((ENDTIME-STARTTIME))"
|
||||
fi
|
||||
|
||||
# extract archive in un-cached root, clean-up on failure
|
||||
cp "${LIVY_ARCHIVE}.tar.gz" ..
|
||||
cd ..
|
||||
if ! tar zxf "${LIVY_ARCHIVE}.tar.gz" ; then
|
||||
echo "Unable to extract ${LIVY_ARCHIVE}.tar.gz" >&2
|
||||
rm -rf "${LIVY_ARCHIVE}"
|
||||
rm -f "${LIVY_ARCHIVE}.tar.gz"
|
||||
fi
|
||||
fi
|
||||
|
||||
set +xe
|
||||
Loading…
Reference in a new issue