Skip to content

Commit

Permalink
HDDS-11664. Hadoop download failure not reported as error (apache#7421)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai authored Nov 13, 2024
1 parent 47c2409 commit 3a18a9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion hadoop-ozone/dev-support/checks/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ download_hadoop_aws() {

if [[ ! -e "${dir}" ]] || [[ ! -d "${dir}"/src/test/resources ]]; then
mkdir -p "${dir}"
[[ -f "${dir}.tar.gz" ]] || curl -LSs -o "${dir}.tar.gz" https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}-src.tar.gz
if [[ ! -f "${dir}.tar.gz" ]]; then
local url="https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}-src.tar.gz"
echo "Downloading Hadoop from ${url}"
curl -LSs --fail -o "${dir}.tar.gz" "$url" || return 1
fi
tar -x -z -C "${dir}" --strip-components=3 -f "${dir}.tar.gz" --wildcards 'hadoop-*-src/hadoop-tools/hadoop-aws' || return 1
fi
}
5 changes: 4 additions & 1 deletion hadoop-ozone/dev-support/checks/acceptance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ if [[ "${OZONE_ACCEPTANCE_SUITE}" == "s3a" ]]; then
export HADOOP_AWS_DIR=${OZONE_ROOT}/target/hadoop-src
fi

download_hadoop_aws "${HADOOP_AWS_DIR}"
if ! download_hadoop_aws "${HADOOP_AWS_DIR}"; then
echo "Failed to download Hadoop ${HADOOP_VERSION}" > "${REPORT_DIR}/summary.txt"
exit 1
fi
fi

export OZONE_ACCEPTANCE_SUITE OZONE_ACCEPTANCE_TEST_TYPE
Expand Down

0 comments on commit 3a18a9d

Please sign in to comment.