-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Improved Java 17 support and Java runtime docs. #12839
Conversation
1) Add a "Java runtime" doc page with information about supported Java versions, garbage collection, and strong encapsulation.. 2) Update asm and equalsverifier to versions that support Java 17. 3) Add additional "--add-opens" lines to surefire configuration, so tests can pass successfully under Java 17. 4) Switch openjdk15 tests to openjdk17. 5) Update FrameFile to specifically mention Java runtime incompatibility as the cause of not being able to use Memory.map. 6) Update SegmentLoadDropHandler to log an error for Errors too, not just Exceptions. This is important because an IllegalAccessError is encountered when the correct "--add-opens" line is not provided, which would otherwise be silently ignored. 7) Update example configs to use druid.indexer.runner.javaOptsArray instead of druid.indexer.runner.javaOpts. (The latter is deprecated.)
I used to submitted a PR #12333 to reflect our support of JDK 11. |
Ah, thanks for pointing that out. It's not quite supported yet, this PR is just a step. #12838 describes some more items we will need. We'll at least need to update DataSketches Memory. |
When building with openjdk17 In CI, I ran into a problem where
|
Brought in when building on Java 17.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes appear to be the result of actually trying Java 17 out with Druid and, as such, the changes are likely valid given that the result works. Reviewed the docs and other bits, all of which look great. LGTM (non-binding)
docs/operations/java.md
Outdated
compatible with Java 17. | ||
|
||
There are many free and actively-supported Java runtime environments available, such as | ||
[Corretto](https://aws.amazon.com/corretto/) and [Zulu](https://www.azul.com/downloads/?package=jdk#download-openjdk). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also mention Adoptium Temurin https://adoptium.net/temurin/releases/ here as one of the non-vendor-specific alternatives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. I wasn't aware of that one. Added it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, all CI have passed. I have taken a loot at most of changes and it LGTM.
One thing I'm not sure is if pull-deps
works under JRE 17.
I did notice that it is run as part of the openjdk17 CI, because there was a problem with it in an earlier version of this patch. So it works at least well enough for that usage (if the strong-encapsulation-related command line parameters are included). I didn't try further usages. |
Co-authored-by: Xavier Léauté <xl+github@xvrl.net>
Some work towards #12838.
Add a "Java runtime" doc page with information about supported
Java versions, garbage collection, and strong encapsulation.
Update asm and equalsverifier to versions that support Java 17.
Add additional "--add-opens" lines to surefire configuration, so
tests can pass successfully under Java 17.
Switch openjdk15 tests to openjdk17.
Update FrameFile to specifically mention Java runtime incompatibility
as the cause of not being able to use Memory.map.
Update SegmentLoadDropHandler to log an error for Errors too, not
just Exceptions. This is important because an IllegalAccessError is
encountered when the correct "--add-opens" line is not provided,
which would otherwise be silently ignored.
Update example configs to use druid.indexer.runner.javaOptsArray
instead of druid.indexer.runner.javaOpts. (The latter is deprecated.)
Added a
run-java
command that sets up the proper "--add-opens"and "--add-exports" parameters for Java 17, and update out-of-box
configs to include
druid.indexer.runner.javaCommand=bin/run-java
so this gets used.