Skip to content

fix(docker): fix docker image build with Java 11 and Hive 2.3.10#18519

Merged
yihua merged 2 commits into
apache:masterfrom
yihua:chore-update-java11-image-1
Apr 17, 2026
Merged

fix(docker): fix docker image build with Java 11 and Hive 2.3.10#18519
yihua merged 2 commits into
apache:masterfrom
yihua:chore-update-java11-image-1

Conversation

@yihua
Copy link
Copy Markdown
Contributor

@yihua yihua commented Apr 17, 2026

Describe the issue this Pull Request addresses

Unblockering #18515

> ./build_docker_images.sh --hadoop-version 2.8.4 --spark-version 3.5.3 --hive-version 2.3.10
Building hoodie/hadoop/base_java11 as apachehudi/hudi-hadoop_2.8.4-base:latest and apachehudi/hudi-hadoop_2.8.4-base:1.2.0-SNAPSHOT
[+] Building 0.9s (3/3) FINISHED                                                                                                                                  docker:desktop-linux
 => [internal] connecting to local controller                                                                                                                                     0.0s
 => [internal] load build definition from Dockerfile                                                                                                                              0.0s
 => => transferring dockerfile: 2.33kB                                                                                                                                            0.0s
 => WARN: MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 19)                                                                            0.0s
 => ERROR [internal] load metadata for docker.io/library/openjdk:11-jdk-slim-bullseye                                                                                             0.7s
------
 > [internal] load metadata for docker.io/library/openjdk:11-jdk-slim-bullseye:
------

 1 warning found (use docker --debug to expand):
 - MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label (line 19)
Dockerfile:18
--------------------
  16 |     # limitations under the License.
  17 |     
  18 | >>> FROM openjdk:11-jdk-slim-bullseye
  19 |     MAINTAINER Hoodie
  20 |     USER root
--------------------
ERROR: openjdk:11-jdk-slim-bullseye: failed to resolve source metadata for docker.io/library/openjdk:11-jdk-slim-bullseye: docker.io/library/openjdk:11-jdk-slim-bullseye: not found
Error: Failed to build docker image for hoodie/hadoop/base_java11

Second error:

 => ERROR [7/8] RUN cp /opt/hive/lib/calcite-core*.jar /opt/hadoop-2.8.4/share/hadoop/common/lib/                                                                                 0.1s 
------                                                                                                                                                                                 
 > [7/8] RUN cp /opt/hive/lib/calcite-core*.jar /opt/hadoop-2.8.4/share/hadoop/common/lib/:                                                                                            
0.122 cp: cannot stat '/opt/hive/lib/calcite-core*.jar': No such file or directory                                                                                                     
------

 5 warnings found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 30)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 31)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 27)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 28)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 29)
Dockerfile:56
--------------------
  54 |         && chmod +x /usr/local/bin/trino
  55 |     
  56 | >>> RUN cp /opt/hive/lib/calcite-core*.jar $HADOOP_HOME/share/hadoop/common/lib/
  57 |     RUN cp /opt/hive/lib/libfb*.jar $HADOOP_HOME/share/hadoop/common/lib/
  58 |     CMD ["/bin/bash", "/opt/spark/adhoc.sh"]
--------------------
ERROR: process "/bin/sh -c cp /opt/hive/lib/calcite-core*.jar $HADOOP_HOME/share/hadoop/common/lib/" did not complete successfully: exit code: 1
Error: Failed to build docker image for hoodie/hadoop/sparkadhoc

Summary and Changelog

  • Replace openjdk:11-jdk-slim-bullseye with eclipse-temurin:11-jdk-jammy in the Java 11 base Dockerfile, as the OpenJDK Docker Hub images have been deprecated and removed
  • Replace deprecated MAINTAINER instruction with LABEL maintainer=
  • Fix sparkadhoc Dockerfile build failure where calcite-core*.jar and libfb*.jar copies fail on Hive 2.3.x (calcite is shaded inside hive-exec.jar in this version)

Eclipse Temurin is the recommended replacement by the official OpenJDK Docker repository. The 11-jdk-jammy variant is Ubuntu 22.04-based, supports both amd64 and arm64, and is actively maintained by the Adoptium project.

Additionally, the sparkadhoc image failed to build because Hive 2.3.x shades calcite inside hive-exec.jar rather than shipping standalone calcite-core*.jar. The copy commands are
now non-fatal (|| true) to support both Hive 2.x and 3.x.

Impact

Upgrades docker images for testing

Risk Level

low. This is a base image swap with no changes to installed packages or build logic.

Documentation Update

N/A

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

Copy link
Copy Markdown
Member

@voonhous voonhous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

TIL that github logs filemode changes, i.e. chmod operations. Very cool!

LGTM.

@yihua yihua changed the title fix(docker): replace removed openjdk 11 base image with eclipse-temurin fix(docker): fix docker image build with Java 11 and Hive 2.3.10 Apr 17, 2026
@github-actions github-actions Bot added the size:XS PR with lines of changes in <= 10 label Apr 17, 2026
@hudi-bot
Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@yihua yihua merged commit 0356488 into apache:master Apr 17, 2026
2 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.84%. Comparing base (a369773) to head (3d422b2).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #18519   +/-   ##
=========================================
  Coverage     68.84%   68.84%           
- Complexity    28250    28255    +5     
=========================================
  Files          2464     2464           
  Lines        135442   135442           
  Branches      16417    16417           
=========================================
+ Hits          93239    93245    +6     
+ Misses        34821    34820    -1     
+ Partials       7382     7377    -5     
Flag Coverage Δ
common-and-other-modules 44.58% <ø> (+<0.01%) ⬆️
hadoop-mr-java-client 44.80% <ø> (-0.01%) ⬇️
spark-client-hadoop-common 48.44% <ø> (-0.01%) ⬇️
spark-java-tests 48.92% <ø> (+<0.01%) ⬆️
spark-scala-tests 45.46% <ø> (+<0.01%) ⬆️
utilities 38.18% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS PR with lines of changes in <= 10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants