Skip to content

Commit 0e79589

Browse files
committed
fix(hadoop): Use timestamped precompiled hadoop instead of SDP release
Note: this commit is being used to illustrate an issue where the timestamp appears as the version in the HDFS web UI instead of the SDP release
1 parent 221b830 commit 0e79589

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

hadoop/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ARG PRODUCT_VERSION
1212
ARG RELEASE_VERSION
1313
ARG STACKABLE_USER_UID
1414
ARG PRECOMPILED_HADOOP_VERSION
15+
ARG PRECOMPILED_HADOOP_TS
1516
# Reassign the arg to `HADOOP_VERSION` for better readability.
1617
ENV HADOOP_VERSION=${PRECOMPILED_HADOOP_VERSION}
1718

@@ -54,7 +55,7 @@ tar -czf /stackable/hdfs-utils-${HDFS_UTILS_VERSION}-src.tar.gz .
5455
mvn \
5556
clean package \
5657
-P hadoop-${HADOOP_VERSION} \
57-
-Dhadoop.version=${HADOOP_VERSION}-stackable${RELEASE_VERSION} \
58+
-Dhadoop.version=${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS} \
5859
-DskipTests \
5960
-Dmaven.javadoc.skip=true
6061

@@ -70,6 +71,7 @@ FROM local-image/java-base AS final
7071
ARG PRODUCT_VERSION
7172
ARG RELEASE_VERSION
7273
ARG PRECOMPILED_HADOOP_VERSION
74+
ARG PRECOMPILED_HADOOP_TS
7375
# Reassign the arg to `HADOOP_VERSION` for better readability.
7476
ENV HADOOP_VERSION=${PRECOMPILED_HADOOP_VERSION}
7577
ARG HDFS_UTILS_VERSION
@@ -88,10 +90,10 @@ LABEL \
8890
summary="The Stackable image for Apache Hadoop." \
8991
description="This image is deployed by the Stackable Operator for Apache Hadoop / HDFS."
9092

91-
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${HADOOP_VERSION}-stackable${RELEASE_VERSION} /stackable/hadoop-${HADOOP_VERSION}-stackable${RELEASE_VERSION}
93+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/hadoop-${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS} /stackable/hadoop-${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS}
9294
COPY --chown=${STACKABLE_USER_UID}:0 --from=hadoop-builder /stackable/*-src.tar.gz /stackable
9395

94-
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS_VERSION}.jar /stackable/hadoop-${HADOOP_VERSION}-stackable${RELEASE_VERSION}/share/hadoop/common/lib/hdfs-utils-${HDFS_UTILS_VERSION}.jar
96+
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS_VERSION}.jar /stackable/hadoop-${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS}/share/hadoop/common/lib/hdfs-utils-${HDFS_UTILS_VERSION}.jar
9597
COPY --chown=${STACKABLE_USER_UID}:0 --from=hdfs-utils-builder /stackable/hdfs-utils-${HDFS_UTILS_VERSION}-src.tar.gz /stackable
9698

9799
COPY --chown=${STACKABLE_USER_UID}:0 hadoop/stackable/jmx /stackable/jmx
@@ -119,7 +121,7 @@ rm -rf /var/cache/yum
119121
# It is so non-root users (as we are) can mount a FUSE device and let other users access it
120122
echo "user_allow_other" > /etc/fuse.conf
121123

122-
ln -s "/stackable/hadoop-${HADOOP_VERSION}-stackable${RELEASE_VERSION}" /stackable/hadoop
124+
ln -s "/stackable/hadoop-${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS}" /stackable/hadoop
123125

124126
# async-profiler
125127
ARCH="${TARGETARCH/amd64/x64}"
@@ -133,7 +135,7 @@ ln -s "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER_VERSION}.jar" /sta
133135

134136
# Set correct permissions and ownerships
135137
chown --recursive ${STACKABLE_USER_UID}:0 /stackable/hadoop /stackable/jmx /stackable/async-profiler "/stackable/async-profiler-${ASYNC_PROFILER_VERSION}-${TARGETOS}-${ARCH}"
136-
chmod --recursive g=u /stackable/jmx /stackable/async-profiler "/stackable/hadoop-${HADOOP_VERSION}-stackable${RELEASE_VERSION}"
138+
chmod --recursive g=u /stackable/jmx /stackable/async-profiler "/stackable/hadoop-${HADOOP_VERSION}-stackable${PRECOMPILED_HADOOP_TS}"
137139

138140
# Workaround for https://issues.apache.org/jira/browse/HADOOP-12845
139141
# The problem is that our stackable-devel image does contain the openssl-devel package

hadoop/boil-config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ java-devel = "11"
1010
precompiled-hadoop-version = "3.3.6"
1111
# Find the latest build timestamp here:
1212
# https://oci.stackable.tech/harbor/projects/52/repositories/hadoop/artifacts-tab
13-
precompiled_hadoop_ts = "1776412753"
13+
precompiled_hadoop_ts = "1776755865"
1414
async-profiler-version = "2.9"
1515
jmx-exporter-version = "1.3.0"
1616
hdfs-utils-version = "0.4.0"
@@ -23,7 +23,7 @@ java-devel = "11"
2323
precompiled-hadoop-version = "3.4.2"
2424
# Find the latest build timestamp here:
2525
# https://oci.stackable.tech/harbor/projects/52/repositories/hadoop/artifacts-tab
26-
precompiled_hadoop_ts = "1776412753"
26+
precompiled_hadoop_ts = "1776755865"
2727
async-profiler-version = "2.9"
2828
jmx-exporter-version = "1.3.0"
2929
hdfs-utils-version = "0.5.0"

0 commit comments

Comments
 (0)