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

Merged
merged 9 commits into from
Jul 3, 2025
Merged

HIVE-29027: Move to JDK-21 #5880

merged 9 commits into from
Jul 3, 2025

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) Moves to HIVE-29056
  • 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

ayushtkn commented Jul 2, 2025

If so, how about creating a separate ticket for it and marking it as a blocking dependency for this one? It already has standalone value, and splitting it out would make this PR much clearer.

Thanx @abstractdog for the review. The ExitUtils change is now separated

@abstractdog
Copy link
Contributor

abstractdog commented Jul 2, 2025

PR looks good to me—I'm open to giving a +1.

The only potentially debatable part is the precision change, which results in many q.out diffs. However, looking at the underlying Java change:
🔗 https://github.com/openjdk/jdk/pull/3402/files
which was eventually committed here:
🔗 openjdk/jdk@72bcf2a

The fact that even Java’s golden files changed is pretty telling—so it is what it is.
For the Hive release, we can note that this is due to JDK-4511638.

assuming that @ayushtkn will consider my comment regarding systemlambda vs. system stubs, LGTM

Copy link
Contributor

@abstractdog abstractdog left a comment

Choose a reason for hiding this comment

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

LGTM +1
Would you be so kind, @ayushtkn, to wait another 24 hours in case anyone has objections?

Copy link

sonarqubecloud bot commented Jul 2, 2025

@ayushtkn ayushtkn merged commit e008e40 into apache:master Jul 3, 2025
4 of 5 checks passed
Indhumathi27 added a commit to Indhumathi27/hive that referenced this pull request Jul 4, 2025
Indhumathi27 added a commit to Indhumathi27/hive that referenced this pull request Jul 21, 2025
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.

8 participants