-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Java] Remove Java 8 support in Arrow v18 #38051
Comments
The discussion thread on |
In addition, the following dependencies are pinned for JDK8:
|
Apache Spark has dropped support for Java 8 and 11 on the main branch (targeting a 4.0 release) apache/spark#43005 Edit: Spark 4.0 release timeframe is 2024-06[1] [1]https://lists.apache.org/thread/xhkgj60j361gdpywoxxz7qspp2w80ry6 |
Netty 5.0 will remove support for Java 8 netty/netty#10650 |
The current consensus on the Arrow mailing list[1] is to postpone Java 8 deprecation and to revisit it when Spark releases 4.0, which deprecates Java 8 (~2024-06). [1] https://lists.apache.org/thread/kml53f81z1oskcf00xl7wlbcjssmn91g |
Apache Derby continuously drops support for older JDK versions #38813 |
My apologies! I accidentally unpinned this issue because I thought I had pinned it just for me, by accident. I just repinned it. |
Apache Iceberg is considering dropping java 8 support https://lists.apache.org/thread/ntrk2thvsg9tdccwd4flsdz9gg743368 |
New mailing list discussion: https://lists.apache.org/thread/65vqpmrrtpshxo53572zcv91j1lb2y8g |
Apologies, I also unpinned it thinking this was just my GitHub view 😂 |
I've looked into this and have some notes. Java ModulesWhen compiling Java code in Java 9 or higher, you can use both the classpath and the module-path.
Maven with Java ModulesMaven may choose to use both the classpath and module-path.
Getting StartedA first step migrating to Java 11 would be to remove (or hide) the Without the Longer TermLonger term, we should include proper I recommend shading in legacy dependencies. This ease the burden for consumers of Arrow libraries. We would not expose packages from those libaries. Consumers can simply add Arrow libraries to the module path without needed flags to grant Arrow modules access to the UNNAMED module. Some dependencies are obsolete, such as |
Do you know why I also haven't observed any change of behavior from "Maven" based on the presence or absence of |
The module-info.java files were added to support JPMS in Arrow 17. When running surefire and failsafe, maven will put JARs with a module-info.class file in the module-path instead of the classpath (when running >JDK8). IIRC there's an option to force using the classpath instead. |
Arrow 16 you meant? Still why was JPMS support needed? Other projects like iceberg and parquet do not provide JPMS support. #13072 description goes over some of the supposed benefits of JPMS but nothing like a concrete issue the project is trying to solve and it seems now we are discussing removing (temporarily) JPMS support in order to move to Java 11? Something doesn't add up |
@jduo There is no option to force using the classpath. You are probably thinking of "useModulePath", which can be true or false. When you target Java 9 or higher, that only controls what happens to dependencies that do not have a |
This work is intended for Arrow 18. I was looking for a way to split up the work. I am not suggesting removing a feature from Arrow for Arrow 18. There are issues with the current Given the sensitivity here, it looks like everything must be solved in one commit. |
But since code is tested with Java 11 and higher, doesn't it mean that this already works?
It seems to be a separate issue from this one, isn't it? |
This didn't show up yet since the target version of Java is 1.8. The Maven compiler plugin cares about what the target version of Java is. Currently Arrow targets Java 1.8, so all libraries are placed on the classpath (even if using JDK 11). When targeting Java 9 or higher, Maven compiler plugin will start to look for "module-info.java" files and decide on whether libraries belong in the classpath or module-path. Use of automatic modules is a separate issue, but may get higher visibility once Java 11 is the minimum for Arrow. More users may start to make use of the JPMS modules. Switching Arrow to Java 11 is not as simple as changing only the target version of Java. That will cause the Maven compiler plugin to use of the module-path for most dependencies and exposes issues with the existing |
I've looked into the CI builds using JDK 11. Those builds still target Java 1.8 when compiling Java code. |
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
As the proof is in the pudding, I took a stab at dropping JDK 8 support and created a pull request |
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
Remove build support for Java 8 and make Java 11 the minimum version to use to build Arrow in github actions and ci tasks
### What changes are included in this PR? * Remove support for Java 8 in Github actions and other CI/CD tasks and make Java 11 now the default version * Make Java 11 the minimum version required to build and run Arrow by changing the Maven project configuration: - Change minimum java version and source/target/release compiler properties to 11 - Remove `maven` modules - Remove jdk11+ profiles and integrate their content into the main section - Let maven-compiler-plugin process `module-info.java` files and address several declaration issues - Exclude non modularized modules from javadoc aggregate tasks - Exclude module-info.class files from shaded jars as it is not representative of the whole content and may actually directly coming from a 3rd party dependency. * Update documentation ### Are these changes tested? Through CI/CD. ### Are there any user-facing changes? Yes. Java 11 is now required to run any Arrow code **This PR includes breaking changes to public APIs.** * GitHub Issue: #38051 Authored-by: Laurent Goujon <[email protected]> Signed-off-by: Dane Pitkin <[email protected]>
Issue resolved by pull request 43139 |
### What changes were proposed in this pull request? This PR aims to upgrade `Arrow` to 18.0.0 for Apache Spark 4.0.0. ### Why are the changes needed? To bring the latest improvements and bug fixes, - https://arrow.apache.org/release/18.0.0.html (28 October 2024) Note that `Arrow 18` is the first release who dropped Java 8 like Apache Spark 4.0.0. - apache/arrow#38051 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48708 from dongjoon-hyun/SPARK-50177. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
Describe the enhancement requested
[1]https://en.wikipedia.org/wiki/Java_Platform_Module_System
[2]https://github.com/apache/arrow/blob/main/dev/release/verify-release-candidate.sh#L571
[3]#37723 (comment)
[4]#13072 (comment)
[5]https://newrelic.com/sites/default/files/2023-04/new-relic-2023-state-of-the-java-ecosystem-2023-04-20.pdf
Post-upgrade tasks
Component(s)
Java
The text was updated successfully, but these errors were encountered: