Skip to content

Commit

Permalink
HDDS-11641. Allow testing Hadoop with custom docker images (apache#7393)
Browse files Browse the repository at this point in the history
(cherry picked from commit efe5892)
  • Loading branch information
adoroszlai authored Nov 5, 2024
1 parent 0211c35 commit 0fb8ee5
Showing 1 changed file with 9 additions and 7 deletions.
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}"}

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

0 comments on commit 0fb8ee5

Please sign in to comment.