Skip to content

Commit 0ddec74

Browse files
authored
chore(hbase): update images for 25.7.0 (#1101)
* remove hbase 2.4.18 * hbase 2.6.1 update hadoop dependency to 3.4.1 The wildcard cop * add hbase 2.6.2 * remove unused argument * downgrade to hbase_thirdparty 4.1.9 again * fix hbase-operator-tools build * patch the maven git plugin for better developer experience * remove comment * update changelog * remove all traces of jmx exporter * revert 2.6.1 to hadoop 3.3.6 * copy both aws bundle artifacts * skip building tests * fix patchable.toml after merge
1 parent c41023a commit 0ddec74

23 files changed

+194
-957
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ All notable changes to this project will be documented in this file.
3939
`check-permissions-ownership.sh` provided in stackable-base image ([#1043]).
4040
- java: Add JDK 24 ([#1097]).
4141
- ci: Add golang image to mirror workflow ([#1103]).
42+
- hbase: add 2.6.2 and upgrade dependencies ([#1101])
4243

4344
### Changed
4445

@@ -81,6 +82,7 @@ All notable changes to this project will be documented in this file.
8182
- hadoop: Remove `3.3.4` and `3.4.0` ([#1099]).
8283
- opa: Remove `0.67.1` ([#1103]).
8384
- opa: Remove legacy bundle-builder from container build ([#1103]).
85+
- hbase: Remove 2.4.18 ([#1101])
8486
- druid: Remove `30.0.0` ([#1110]).
8587
- nifi: Remove `2.2.0` ([#1114]).
8688

@@ -110,6 +112,7 @@ All notable changes to this project will be documented in this file.
110112
[#1097]: https://github.com/stackabletech/docker-images/pull/1097
111113
[#1098]: https://github.com/stackabletech/docker-images/pull/1098
112114
[#1099]: https://github.com/stackabletech/docker-images/pull/1099
115+
[#1101]: https://github.com/stackabletech/docker-images/pull/1101
113116
[#1102]: https://github.com/stackabletech/docker-images/pull/1102
114117
[#1103]: https://github.com/stackabletech/docker-images/pull/1103
115118
[#1106]: https://github.com/stackabletech/docker-images/pull/1106

hbase/Dockerfile

+34-24
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ FROM stackable/image/hadoop AS hadoop-builder
66
FROM stackable/image/java-devel AS hbase-builder
77

88
ARG PRODUCT
9-
ARG HBASE_THIRDPARTY
109
ARG HBASE_OPERATOR_TOOLS
1110
ARG ASYNC_PROFILER
1211
ARG PHOENIX
1312
ARG HBASE_PROFILE
14-
ARG JMX_EXPORTER
1513
ARG HADOOP
1614
ARG TARGETARCH
1715
ARG TARGETOS
@@ -28,7 +26,6 @@ WORKDIR /stackable
2826

2927
COPY --chown=${STACKABLE_USER_UID}:0 hbase/stackable/patches/patchable.toml /stackable/src/hbase/stackable/patches/patchable.toml
3028
COPY --chown=${STACKABLE_USER_UID}:0 hbase/stackable/patches/${PRODUCT} /stackable/src/hbase/stackable/patches/${PRODUCT}
31-
COPY --chown=${STACKABLE_USER_UID}:0 hbase/stackable/jmx/config${JMX_EXPORTER} /stackable/jmx
3229

3330
# Cache mounts are owned by root by default
3431
# We need to explicitly give the uid to use
@@ -49,8 +46,25 @@ cd "$(/stackable/patchable --images-repo-root=src checkout hbase ${PRODUCT})"
4946

5047
# The release scripts of HBase also run the build twice (three times in fact, once again to build the site which we skip here).
5148
# I chose to replicate that exact behavior for consistency so please don't merge the two mvn runs into one unless you really know what you're doing!
52-
mvn --batch-mode --no-transfer-progress -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} clean install -DskipTests
53-
mvn --batch-mode --no-transfer-progress -Dhadoop.profile=3.0 -Dhadoop-three.version=${HADOOP} install assembly:single -DskipTests -Dcheckstyle.skip=true -Prelease
49+
# Cannot skip building tests here because the assembly plugin needs a shell script from the test directory.
50+
mvn \
51+
--batch-mode \
52+
--no-transfer-progress \
53+
-Dhadoop.profile=3.0 \
54+
-Dhadoop-three.version=${HADOOP} \
55+
-DskipTests \
56+
clean install
57+
58+
mvn \
59+
--batch-mode \
60+
--no-transfer-progress \
61+
-Dhadoop.profile=3.0 \
62+
-Dhadoop-three.version=${HADOOP} \
63+
-DskipTests \
64+
-Dcheckstyle.skip=true \
65+
-Prelease \
66+
install assembly:single
67+
5468
tar -xzf hbase-assembly/target/hbase-${PRODUCT}-bin.tar.gz -C /stackable/
5569
mv hbase-assembly/target/bom.json /stackable/hbase-${PRODUCT}/hbase-${PRODUCT}.cdx.json
5670

@@ -59,15 +73,6 @@ mv hbase-assembly/target/bom.json /stackable/hbase-${PRODUCT}/hbase-${PRODUCT}.c
5973

6074
ln -s "/stackable/hbase-${PRODUCT}" /stackable/hbase
6175

62-
###
63-
### JMX Prometheus Exporter/Agent
64-
###
65-
if [[ -n "${JMX_EXPORTER}" ]] ; then
66-
curl --fail "https://repo.stackable.tech/repository/packages/jmx-exporter/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" -o "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar"
67-
chmod +x "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar"
68-
ln -s "/stackable/jmx/jmx_prometheus_javaagent-${JMX_EXPORTER}.jar" /stackable/jmx/jmx_prometheus_javaagent.jar
69-
fi
70-
7176
###
7277
### Async Profiler
7378
###
@@ -93,14 +98,17 @@ EOF
9398

9499
FROM stackable/image/java-devel AS opa-authorizer-builder
95100

101+
ARG PRODUCT
96102
ARG OPA_AUTHORIZER
97103
ARG DELETE_CACHES
98104
ARG STACKABLE_USER_UID
99105

100106
USER ${STACKABLE_USER_UID}
101107
WORKDIR /stackable
102108

103-
RUN --mount=type=cache,id=maven-opa,uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
109+
# Use the product version as cache id "maven-opa-${PRODUCT}" to avoid the "rm -rf" problem described above.
110+
# Using the OPA_AUTHORIZER arg is not unique if the same version is used for multiple products.
111+
RUN --mount=type=cache,id=maven-opa-${PRODUCT},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
104112
###
105113
### OPA Authorizer (only for 2.6 upwards)
106114
###
@@ -109,9 +117,10 @@ if [[ -n "$OPA_AUTHORIZER" ]]; then
109117
mvn \
110118
--batch-mode \
111119
--no-transfer-progress \
112-
package \
113120
-DskipTests \
114-
-fhbase-opa-authorizer
121+
-Dmaven.test.skip=true \
122+
-fhbase-opa-authorizer \
123+
package
115124
else
116125
# Create a dummy jar to avoid errors when copying it the final image
117126
mkdir -p hbase-opa-authorizer/target
@@ -155,16 +164,13 @@ WORKDIR /stackable
155164
RUN --mount=type=cache,id=maven-hbase-operator-tools-${HBASE_OPERATOR_TOOLS},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
156165
cd "$(/stackable/patchable --images-repo-root=src checkout hbase-operator-tools ${HBASE_OPERATOR_TOOLS})"
157166

158-
# Remove the Git repo because `git-commit-id-maven-plugin` tries to get the latest commit if a Git repo is present,
159-
# which fails due to a problem with worktrees, see https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/215
160-
rm .git
161-
162167
mvn \
163168
--batch-mode \
164169
--no-transfer-progress \
165170
-Dhbase.version=${PRODUCT} \
166171
-Dhbase-thirdparty.version=${HBASE_THIRDPARTY} \
167172
-DskipTests \
173+
-Dmaven.test.skip=true \
168174
package assembly:single
169175

170176
# We need the "*" here as the directory won't be the same as the final tar file for SNAPSHOTs which we currently have to use for 2.6
@@ -208,6 +214,11 @@ USER ${STACKABLE_USER_UID}
208214
WORKDIR /stackable
209215

210216
COPY --from=hadoop-builder --chown=${STACKABLE_USER_UID}:0 \
217+
# The artifact name of the AWS bundle has changed between Haddop 3.3.6 and 3.4.1
218+
# from aws-java-sdk-bundle-*.jar to bundle-*.jar.
219+
# See: https://hadoop.apache.org/docs/stable/hadoop-aws/tools/hadoop-aws/aws_sdk_upgrade.html
220+
# So we try to copy both and if one of them doesn't exist buildx will just ignore it :)
221+
/stackable/hadoop/share/hadoop/tools/lib/bundle-*.jar \
211222
/stackable/hadoop/share/hadoop/tools/lib/aws-java-sdk-bundle-*.jar \
212223
/stackable/hadoop/share/hadoop/tools/lib/hadoop-aws-${HADOOP}.jar \
213224
/stackable/hadoop/share/hadoop/tools/lib/
@@ -248,7 +259,7 @@ COPY --chown=${STACKABLE_USER_UID}:0 hbase/phoenix/stackable/patches/${PHOENIX}
248259
USER ${STACKABLE_USER_UID}
249260
WORKDIR /stackable
250261

251-
RUN --mount=type=cache,id=maven-phoenix-${PHOENIX},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
262+
RUN --mount=type=cache,id=maven-phoenix-${PHOENIX}-${PRODUCT},uid=${STACKABLE_USER_UID},target=/stackable/.m2/repository <<EOF
252263
cd "$(/stackable/patchable --images-repo-root=src checkout phoenix ${PHOENIX})"
253264

254265
# The Maven command can be found inside of the scripts in the create-release folder (release-util.sh as of Phoenix 5.2.0)
@@ -260,6 +271,7 @@ mvn \
260271
-Dhbase.profile=${HBASE_PROFILE} \
261272
-Dhadoop.version=${HADOOP} \
262273
-DskipTests \
274+
-Dmaven.test.skip=true \
263275
-Dcheckstyle.skip=true \
264276
clean \
265277
package
@@ -324,7 +336,6 @@ LABEL io.k8s.display-name="${NAME}"
324336

325337
COPY --chown=${STACKABLE_USER_UID}:0 --from=hbase-builder /stackable/hbase-${PRODUCT} /stackable/hbase-${PRODUCT}/
326338
COPY --chown=${STACKABLE_USER_UID}:0 --from=hbase-builder /stackable/async-profiler /stackable/async-profiler/
327-
COPY --chown=${STACKABLE_USER_UID}:0 --from=hbase-builder /stackable/jmx /stackable/jmx/
328339

329340
COPY --chown=${STACKABLE_USER_UID}:0 --from=hbase-operator-tools-builder /stackable/hbase-operator-tools-${HBASE_OPERATOR_TOOLS} /stackable/hbase-operator-tools-${HBASE_OPERATOR_TOOLS}/
330341
COPY --chown=${STACKABLE_USER_UID}:0 --from=hbase-operator-tools-builder /stackable/bin/hbck2 /stackable/bin/hbck2
@@ -378,7 +389,6 @@ chmod g=u "/stackable/hbase/lib/phoenix-server-hbase-${HBASE_PROFILE}.jar"
378389
# fix missing permissions
379390
chmod g=u /stackable/async-profiler
380391
chmod g=u /stackable/bin
381-
chmod g=u /stackable/jmx
382392
chmod g=u /stackable/phoenix
383393
# the whole directory tree /stackable/hadoop/share/hadoop/tools/lib/ must be adapted
384394
find /stackable/hadoop -type d -exec chmod g=u {} +
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
From f9e952767faf3032c0d4e729e51b5901fcf1a0e1 Mon Sep 17 00:00:00 2001
2+
From: Razvan-Daniel Mihai <[email protected]>
3+
Date: Tue, 6 May 2025 17:58:34 +0200
4+
Subject: Exclude hbase-testing-utils dependency from the build.
5+
6+
---
7+
hbase-hbck2/pom.xml | 11 +++++++++--
8+
hbase-tools/pom.xml | 5 +++--
9+
2 files changed, 12 insertions(+), 4 deletions(-)
10+
11+
diff --git a/hbase-hbck2/pom.xml b/hbase-hbck2/pom.xml
12+
index 1d57225..fd0018c 100644
13+
--- a/hbase-hbck2/pom.xml
14+
+++ b/hbase-hbck2/pom.xml
15+
@@ -114,12 +114,19 @@
16+
</exclusion>
17+
</exclusions>
18+
</dependency>
19+
- <dependency>
20+
+ <!-- Starting with Hbase 2.6.2, this brings in a dependency that is not publicly available:
21+
+ org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2
22+
+
23+
+ Since we do not run the tests, we exclude this dependency.
24+
+
25+
+ To build successfully we also need to use -Dmaven.test.skip=true to skip building the tests.
26+
+ -->
27+
+ <!-- dependency>
28+
<groupId>org.apache.hbase</groupId>
29+
<artifactId>hbase-testing-util</artifactId>
30+
<version>${hbase.version}</version>
31+
<scope>test</scope>
32+
- </dependency>
33+
+ </dependency -->
34+
<dependency>
35+
<groupId>org.mockito</groupId>
36+
<artifactId>mockito-core</artifactId>
37+
diff --git a/hbase-tools/pom.xml b/hbase-tools/pom.xml
38+
index 55ef075..eeebe14 100644
39+
--- a/hbase-tools/pom.xml
40+
+++ b/hbase-tools/pom.xml
41+
@@ -103,12 +103,13 @@
42+
</exclusion>
43+
</exclusions>
44+
</dependency>
45+
- <dependency>
46+
+ <!-- See the hbase-hbck2/pom.xml for an explanation of why this is commented out -->
47+
+ <!-- dependency>
48+
<groupId>org.apache.hbase</groupId>
49+
<artifactId>hbase-testing-util</artifactId>
50+
<version>${hbase.version}</version>
51+
<scope>test</scope>
52+
- </dependency>
53+
+ </dependency -->
54+
<dependency>
55+
<groupId>org.mockito</groupId>
56+
<artifactId>mockito-core</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 187db522edc569def2aea3f9453ecb1a674592fe Mon Sep 17 00:00:00 2001
2+
From: Razvan-Daniel Mihai <[email protected]>
3+
Date: Wed, 7 May 2025 10:26:37 +0200
4+
Subject: Configure git-commit-id-plugin to use native git
5+
6+
This fixes the problem that jgit cannot handle worktrees and the build
7+
fails.
8+
9+
See
10+
https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/215
11+
---
12+
hbase-hbck2/pom.xml | 3 ++-
13+
1 file changed, 2 insertions(+), 1 deletion(-)
14+
15+
diff --git a/hbase-hbck2/pom.xml b/hbase-hbck2/pom.xml
16+
index fd0018c..f00bd18 100644
17+
--- a/hbase-hbck2/pom.xml
18+
+++ b/hbase-hbck2/pom.xml
19+
@@ -215,8 +215,9 @@
20+
<plugin>
21+
<groupId>pl.project13.maven</groupId>
22+
<artifactId>git-commit-id-plugin</artifactId>
23+
- <version>2.2.5</version>
24+
+ <version>4.9.10</version>
25+
<configuration>
26+
+ <useNativeGit>true</useNativeGit>
27+
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
28+
<commitIdGenerationMode>flat</commitIdGenerationMode>
29+
<failOnNoGitDirectory>false</failOnNoGitDirectory>

hbase/stackable/jmx/config/README.md

-5
This file was deleted.

hbase/stackable/jmx/config1.2.0/master.yaml

-3
This file was deleted.

hbase/stackable/jmx/config1.2.0/regionserver.yaml

-3
This file was deleted.

hbase/stackable/jmx/config1.2.0/restserver.yaml

-3
This file was deleted.

hbase/stackable/patches/2.4.18/0001-HBASE-27103-Fixes-HBase-build-on-arm64.patch

-34
This file was deleted.

0 commit comments

Comments
 (0)