Skip to content

HIVE-29027: Move to JDK-21 #5880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

HIVE-29027: Move to JDK-21 #5880

wants to merge 9 commits into from

Conversation

ayushtkn
Copy link
Member

@ayushtkn ayushtkn commented Jun 17, 2025

Tasks

  • Hive Dev Box to support JDK-21 --> Built custom image with jdk-21 support & pushed to DockerHub
  • DockerFiles to use JDK-21 -> Bump JDK version in docker images
  • System.setSecurityManager removal in JDK-21 --> Replaced System.exit() & setSecurityManager with ExitUtil (Hadoop Solution)
  • Removal of Thread.stop() -> Thread.stop is removed in JDK-21 --> Replaced with interrupt & will thread handle (Replaced in a deprecated test only method otherwise interrupt ain't a direct replacement of stop)
  • Removal of Reflections hack -> JDK-21 is more strict it doesn't let hack the Final fields -> test class had field Final removed that final from test class & dropped the hack
  • JWT tests modifying System env --> Not supported in JDK-21, tried some hacks to prevent not dropping those tests, may not be exact copy but better than dropping
  • Decimal/Float precession change in JDK-21 --> JDK-21 had changes around the precession, leads to query output regen, haven't found any hack to use the old behaviour, as of now can't help it but adapt. https://inside.java/2022/09/23/quality-heads-up/
    https://bugs.openjdk.org/browse/JDK-4511638
  • Kudu tests failing -> Tests failing since Kudu uses internal java classes removed in JDK-21 raised KUDU-3670. --> Replaced the util which runs the Kudu Cluster with directly running the Kudu cluster

@aturoczy
Copy link

Instant approve :)

@ayushtkn
Copy link
Member Author

Down to some 24 Failures, of which 2 flaky (they passed in previous build). 22 are all from Kudu Handler. Have created a ticket KUDU-3670.

@ayushtkn ayushtkn changed the title WIP HIVE-29027: Move to JDK-21+ Jun 18, 2025
@ayushtkn ayushtkn changed the title HIVE-29027: Move to JDK-21+ [WIP] HIVE-29027: Move to JDK-21+ Jun 18, 2025
@deniskuzZ
Copy link
Member

Trino is already on JDK-24, doesn't even compile with lower versions

@ayushtkn
Copy link
Member Author

Green Build with JDK-21 :-)

@ayushtkn ayushtkn changed the title [WIP] HIVE-29027: Move to JDK-21+ [WIP] HIVE-29027: Move to JDK-21 Jun 18, 2025
@deniskuzZ
Copy link
Member

134 files changed 🥇

@simhadri-g
Copy link
Member

simhadri-g commented Jun 18, 2025

Awesome, will this be in hive v5.0 ? :)

@deniskuzZ
Copy link
Member

@ayushtkn, did you grep for

    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>

see https://issues.apache.org/jira/browse/HIVE-29018

@ayushtkn
Copy link
Member Author

I didn't knew something was on 8 :-)
I just pushed upgrading it to 21, ran tests locally in that module, they were passing, rest will see

[INFO] Results:
[INFO] 
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

@ayushtkn ayushtkn force-pushed the jdk21 branch 2 times, most recently from 1c77f36 to 70e605e Compare June 18, 2025 20:42
Copy link

@ayushtkn ayushtkn changed the title [WIP] HIVE-29027: Move to JDK-21 HIVE-29027: Move to JDK-21 Jun 19, 2025
@deniskuzZ
Copy link
Member

deniskuzZ commented Jun 19, 2025

@ayushtkn, what are the plans here? should we wait with the merge until 4.1.0 cut-off ?

@ayushtkn
Copy link
Member Author

That is what I am thinking, hold it till branch 4.1.0 is cut & then chase this for master branch

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

Successfully merging this pull request may close these issues.

5 participants