From 3d18dbac622f4bc0f523865e6df984abfe3acafa Mon Sep 17 00:00:00 2001 From: Yong Date: Sun, 16 Mar 2025 14:59:15 -0500 Subject: [PATCH 1/3] Fix spark download link needed for regtest --- regtests/run.sh | 2 +- regtests/setup.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/regtests/run.sh b/regtests/run.sh index 769531ae52..fb3af6831a 100755 --- a/regtests/run.sh +++ b/regtests/run.sh @@ -20,7 +20,7 @@ # Run without args to run all tests, or single arg for single test. SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -export SPARK_VERSION=spark-3.5.4 +export SPARK_VERSION=spark-3.5.5 export SPARK_DISTRIBUTION=${SPARK_VERSION}-bin-hadoop3 if [ -z "${SPARK_HOME}" ]; then diff --git a/regtests/setup.sh b/regtests/setup.sh index 5b03eab03f..2276c7799e 100755 --- a/regtests/setup.sh +++ b/regtests/setup.sh @@ -44,12 +44,12 @@ if ! [ -f ${SPARK_HOME}/bin/spark-sql ]; then fi if ! [ -f ~/${SPARK_DISTRIBUTION}.tgz ]; then echo 'Downloading spark distro...' - wget -O ~/${SPARK_DISTRIBUTION}.tgz https://dlcdn.apache.org/spark/${SPARK_VERSION}/${SPARK_DISTRIBUTION}.tgz + wget -O ~/${SPARK_DISTRIBUTION}.tgz https://archive.apache.org/dist/spark/${SPARK_VERSION}/${SPARK_DISTRIBUTION}.tgz if ! [ -f ~/${SPARK_DISTRIBUTION}.tgz ]; then if [[ "${OSTYPE}" == "darwin"* ]]; then echo "Detected OS: mac. Running 'brew install wget' to try again." brew install wget - wget -O ~/${SPARK_DISTRIBUTION}.tgz https://dlcdn.apache.org/spark/${SPARK_VERSION}/${SPARK_DISTRIBUTION}.tgz + wget -O ~/${SPARK_DISTRIBUTION}.tgz https://archive.apache.org/dist/spark/${SPARK_VERSION}/${SPARK_DISTRIBUTION}.tgz fi fi else From 52a0981e912170421e6b1817ccbf10777075f955 Mon Sep 17 00:00:00 2001 From: Yong Date: Sun, 16 Mar 2025 15:18:03 -0500 Subject: [PATCH 2/3] Cleanup tarball after extracted --- regtests/setup.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/regtests/setup.sh b/regtests/setup.sh index 2276c7799e..91a8bf5f65 100755 --- a/regtests/setup.sh +++ b/regtests/setup.sh @@ -55,8 +55,19 @@ if ! [ -f ${SPARK_HOME}/bin/spark-sql ]; then else echo 'Found existing Spark tarball' fi + # check if the download was successful + if ! [ -f ~/${SPARK_DISTRIBUTION}.tgz ]; then + echo 'Failed to download Spark distribution. Please check the logs.' + exit 1 + fi tar xzvf ~/${SPARK_DISTRIBUTION}.tgz -C ~ - echo 'Done!' + if [ $? -ne 0 ]; then + echo 'Failed to extract Spark distribution. Please check the logs.' + exit 1 + else + echo 'Extracted Spark distribution.' + rm ~/${SPARK_DISTRIBUTION}.tgz + fi SPARK_HOME=$(realpath ~/${SPARK_DISTRIBUTION}) SPARK_CONF="${SPARK_HOME}/conf/spark-defaults.conf" else From 5e284ee6d8607c3e5d8f85317f570a64d4eb736b Mon Sep 17 00:00:00 2001 From: Yong Date: Tue, 18 Mar 2025 21:08:11 -0500 Subject: [PATCH 3/3] Update spark from 3.5.4 to 3.5.5 --- regtests/run_spark_sql.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regtests/run_spark_sql.sh b/regtests/run_spark_sql.sh index af662a484d..88eb481957 100755 --- a/regtests/run_spark_sql.sh +++ b/regtests/run_spark_sql.sh @@ -46,7 +46,7 @@ fi REGTEST_HOME=$(dirname $(realpath $0)) cd ${REGTEST_HOME} -export SPARK_VERSION=spark-3.5.4 +export SPARK_VERSION=spark-3.5.5 export SPARK_DISTRIBUTION=${SPARK_VERSION}-bin-hadoop3 export SPARK_LOCAL_HOSTNAME=localhost # avoid VPN messing up driver local IP address binding