Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11641. Allow testing Hadoop with custom docker images #7393

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions hadoop-ozone/dist/src/main/compose/common/hadoop-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ if [[ ${SECURITY_ENABLED} == "true" ]]; then
fi
export COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.yaml}":../common/${extra_compose_file}

# need temp variables because maven filtering replaces only one item per line
hadoop2_version="${hadoop2.version}"
hadoop_version="${hadoop.version}"

: ${HADOOP_TEST_VERSIONS:="apache/hadoop:${hadoop2_version} flokkr/hadoop:3.1.2 apache/hadoop:${hadoop_version}"}
dombizita marked this conversation as resolved.
Show resolved Hide resolved

export HADOOP_MAJOR_VERSION=3
export HADOOP_VERSION=unused # will be set for each test version below
export OZONE_REPLICATION_FACTOR=3
Expand All @@ -42,14 +48,10 @@ export OZONE_DIR=/opt/ozone
# shellcheck source=/dev/null
source "$COMPOSE_DIR/../testlib.sh"

for HADOOP_VERSION in ${hadoop2.version} 3.1.2 ${hadoop.version}; do
export HADOOP_VERSION
for test_version in $HADOOP_TEST_VERSIONS; do
export HADOOP_IMAGE="${test_version%%:*}"
export HADOOP_VERSION="${test_version##*:}"
export HADOOP_MAJOR_VERSION=${HADOOP_VERSION%%.*}
if [[ "${HADOOP_VERSION}" == "${hadoop2.version}" ]] || [[ "${HADOOP_VERSION}" == "${hadoop.version}" ]]; then
export HADOOP_IMAGE=apache/hadoop
else
export HADOOP_IMAGE=flokkr/hadoop
fi

docker-compose --ansi never --profile hadoop up -d nm rm

Expand Down