Skip to content

Commit bc58e61

Browse files
committed
feat: Add Hadoop 3.5.0
1 parent fbd4f79 commit bc58e61

26 files changed

Lines changed: 1492 additions & 13 deletions
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
# This script mirrors the boostorg/boost source bundle for the given version to Nexus.
3+
# The boost source bundle is architecture independent.
4+
# It contains its own build system (b2) which is also built from source before building boost itself, so we don't need to worry about architecture specific builds.
5+
# This artifact is used by the hadoop/boost local image.
6+
7+
8+
set -euo pipefail
9+
10+
VERSION=${1:?"Missing version number argument (arg 1)"}
11+
NEXUS_USER=${2:?"Missing Nexus username argument (arg 2)"}
12+
13+
read -r -s -p "Nexus Password: " NEXUS_PASSWORD
14+
echo ""
15+
16+
# https://stackoverflow.com/questions/4632028/how-to-create-a-temporary-directory
17+
# Find the directory name of the script
18+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
19+
20+
# the temp directory used, within $DIR
21+
WORK_DIR=$(mktemp -d -p "$DIR")
22+
23+
# check if tmp dir was created
24+
if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
25+
echo "Could not create temp dir"
26+
exit 1
27+
fi
28+
29+
# deletes the temp directory
30+
function cleanup {
31+
rm -rf "$WORK_DIR"
32+
}
33+
34+
# register the cleanup function to be called on the EXIT signal
35+
trap cleanup EXIT
36+
37+
cd "$WORK_DIR" || exit
38+
39+
# boost does not currently publish signatures or SBOMs
40+
BOOST_UNDERSCORE="$(echo "${VERSION}" | tr '.' '_')"
41+
BOOST_TARBALL="boost_${BOOST_UNDERSCORE}.tar.bz2"
42+
DOWNLOAD_URL="https://archives.boost.io/release/$VERSION/source/$BOOST_TARBALL"
43+
44+
echo "Downloading boost"
45+
if ! curl --fail -Ls -O "$DOWNLOAD_URL"; then
46+
echo "Failed to download from $DOWNLOAD_URL"
47+
exit 1
48+
fi
49+
50+
FILE_NAME=$(basename "$DOWNLOAD_URL")
51+
52+
echo "Uploading boost to Nexus"
53+
if ! curl --fail -o /dev/null --progress-bar -u "$NEXUS_USER:$NEXUS_PASSWORD" --upload-file "$FILE_NAME" 'https://repo.stackable.tech/repository/packages/boost/'; then
54+
echo "Failed to upload boost to Nexus"
55+
exit 1
56+
fi
57+
58+
echo "Successfully uploaded new version of boost ($VERSION) to Nexus"
59+
echo "https://repo.stackable.tech/service/rest/repository/browse/packages/boost/"

hadoop/boil-config.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,24 @@ java-devel = "11"
2020
[versions."3.4.2".build-arguments]
2121
async-profiler-version = "2.9"
2222
jmx-exporter-version = "1.3.0"
23-
hdfs-utils-version = "0.5.0"
23+
hdfs-utils-version = "0.6.0"
24+
25+
[versions."3.4.3".local-images]
26+
"hadoop/hadoop" = "3.4.3"
27+
java-base = "11"
28+
java-devel = "11"
29+
30+
[versions."3.4.3".build-arguments]
31+
async-profiler-version = "2.9"
32+
jmx-exporter-version = "1.3.0"
33+
hdfs-utils-version = "0.6.0"
34+
35+
[versions."3.5.0".local-images]
36+
"hadoop/hadoop" = "3.5.0"
37+
java-base = "17"
38+
java-devel = "17"
39+
40+
[versions."3.5.0".build-arguments]
41+
async-profiler-version = "2.9"
42+
jmx-exporter-version = "1.3.0"
43+
hdfs-utils-version = "0.6.0"

hadoop/hadoop/Dockerfile

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
22
# check=error=true
33

4+
FROM local-image/shared/boost AS boost-builder
45
FROM local-image/java-devel AS hadoop-builder
56

67
ARG PRODUCT_VERSION
@@ -14,17 +15,22 @@ COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/patchable
1415
COPY --chown=${STACKABLE_USER_UID}:0 shared/protobuf/stackable/patches/${PROTOBUF_VERSION} /stackable/src/shared/protobuf/stackable/patches/${PROTOBUF_VERSION}
1516

1617
RUN <<EOF
17-
rpm --install --replacepkgs https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
1818
microdnf update
19-
# boost is a build dependency starting in Hadoop 3.4.0 if compiling native code
20-
# automake and libtool are required to build protobuf
21-
microdnf install boost1.78-devel automake libtool
19+
# libstdc++ is a runtime dependency for boost,
20+
# automake and libtool are needed to build protobuf
21+
microdnf install libstdc++ automake libtool
2222
microdnf clean all
2323
rm -rf /var/cache/yum
2424
mkdir /opt/protobuf
2525
chown ${STACKABLE_USER_UID}:0 /opt/protobuf
2626
EOF
2727

28+
COPY --chown=${STACKABLE_USER_UID}:0 --from=boost-builder /stackable/boost /stackable/boost
29+
30+
ENV BOOST_ROOT=/stackable/boost
31+
ENV LD_LIBRARY_PATH=/stackable/boost/lib
32+
ENV CPATH=/stackable/boost/include
33+
2834
USER ${STACKABLE_USER_UID}
2935
# This Protobuf version is the exact version as used in the Hadoop Dockerfile
3036
# See https://github.com/apache/hadoop/blob/trunk/dev-support/docker/pkg-resolver/install-protobuf.sh
@@ -35,10 +41,18 @@ RUN <<EOF
3541
# Create snapshot of the source code including custom patches
3642
tar -czf /stackable/protobuf-${PROTOBUF_VERSION}-src.tar.gz .
3743

38-
./autogen.sh
39-
./configure --prefix=/opt/protobuf
40-
make "-j$(nproc)"
41-
make install
44+
if [ "$PROTOBUF_VERSION" == "3.7.1" ] || [ "$PROTOBUF_VERSION" == "3.21.12" ]; then
45+
./autogen.sh
46+
./configure --prefix=/opt/protobuf
47+
make "-j$(nproc)"
48+
make install
49+
else
50+
# protobuf > 3.21 bundles abseil-cpp and utf8_range as git submodules
51+
git submodule update --init --recursive
52+
cmake -S . -B build -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF
53+
cmake --build build --parallel $(nproc)
54+
cmake --install build --prefix /opt/protobuf
55+
fi
4256
(cd .. && rm -r ${PROTOBUF_VERSION})
4357
EOF
4458

hadoop/hadoop/boil-config.toml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
[versions."3.3.6".local-images]
22
java-devel = "11"
3+
"shared/boost" = "1.72.0" # I could not find a documented recommended version
34

45
[versions."3.3.6".build-arguments]
5-
protobuf-version = "3.7.1"
6+
protobuf-version = "3.7.1" # https://github.com/apache/hadoop/blob/rel/release-3.3.6/BUILDING.txt
7+
68

79
[versions."3.4.2".local-images]
8-
java-devel = "11"
10+
java-devel = "11" # https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
11+
"shared/boost" = "1.72.0" # https://github.com/apache/hadoop/blob/rel/release-3.4.2/BUILDING.txt
912

1013
[versions."3.4.2".build-arguments]
11-
protobuf-version = "3.7.1"
14+
protobuf-version = "3.21.12" # https://github.com/apache/hadoop/blob/rel/release-3.4.2/BUILDING.txt
15+
16+
17+
[versions."3.4.3".local-images]
18+
java-devel = "11" # https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
19+
"shared/boost" = "1.72.0" # https://github.com/apache/hadoop/blob/rel/release-3.4.3/BUILDING.txt
20+
21+
[versions."3.4.3".build-arguments]
22+
protobuf-version = "3.21.12" # https://github.com/apache/hadoop/blob/rel/release-3.4.3/BUILDING.txt
23+
24+
25+
[versions."3.5.0".local-images]
26+
java-devel = "17" # https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+Java+Versions
27+
"shared/boost" = "1.86.0" # https://github.com/apache/hadoop/blob/rel/release-3.5.0/BUILDING.txt
28+
29+
[versions."3.5.0".build-arguments]
30+
protobuf-version = "3.25.5" # https://github.com/apache/hadoop/blob/rel/release-3.5.0/BUILDING.txt
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 7ad31a922a9fbcecd884b4bdf5c416f6b0ea539e Mon Sep 17 00:00:00 2001
2+
From: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
3+
Date: Tue, 26 May 2026 15:40:40 +0200
4+
Subject: YARN-11527-Update-node.js
5+
6+
---
7+
hadoop-project/pom.xml | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml
11+
index 0813904f98a..f837b1f5201 100644
12+
--- a/hadoop-project/pom.xml
13+
+++ b/hadoop-project/pom.xml
14+
@@ -236,7 +236,7 @@
15+
<woodstox.version>5.4.0</woodstox.version>
16+
<nimbus-jose-jwt.version>10.4</nimbus-jose-jwt.version>
17+
<jcip-annotations.version>1.0-1</jcip-annotations.version>
18+
- <nodejs.version>v12.22.1</nodejs.version>
19+
+ <nodejs.version>v14.17.0</nodejs.version>
20+
<yarnpkg.version>v1.22.5</yarnpkg.version>
21+
<apache-ant.version>1.10.13</apache-ant.version>
22+
<jmh.version>1.20</jmh.version>

0 commit comments

Comments
 (0)