-
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
GH-35053: [Java] Fix MemoryUtil to support Java 21 #36370
Conversation
|
|
1 similar comment
|
|
|
The
|
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.
Thanks!
It looks like Java 21 isn't planned to release until September. @davisusanibar do we have an issue to track adding this to CI?
Thank you, @lidavidm . It will be GA on 19th September. Currently, GitHub Action jobs can use
|
Thank you so much! |
Conbench analyzed the 6 benchmark runs on commit There were 2 benchmark results indicating a performance regression:
The full Conbench report has more details. |
### What changes were proposed in this pull request? The pr aims to upgrade arrow from 12.0.1 to 13.0.0. ### Why are the changes needed? 1. Arrow 12.0.1 VS 13.0.0 apache/arrow@apache-arrow-12.0.1...apache-arrow-13.0.0 2. Arrow 13.0.0 is the first version to support Java 21. - apache/arrow#36370 When arrow version 12.0.1 running on Java21, the following error occurred: ``` java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init>(long, int) not available org.apache.arrow.memory.util.MemoryUtil.directBuffer(MemoryUtil.java:167) org.apache.arrow.memory.ArrowBuf.getDirectBuffer(ArrowBuf.java:228) org.apache.arrow.memory.ArrowBuf.nioBuffer(ArrowBuf.java:223) org.apache.arrow.vector.ipc.ReadChannel.readFully(ReadChannel.java:87) org.apache.arrow.vector.ipc.message.MessageSerializer.readMessageBody(MessageSerializer.java:727) org.apache.arrow.vector.ipc.message.MessageChannelReader.readNext(MessageChannelReader.java:67) org.apache.arrow.vector.ipc.ArrowStreamReader.loadNextBatch(ArrowStreamReader.java:145) ``` After this PR, we can try to enable netty related testing in Java21. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - Pass GA. Closes #42181 from panbingkun/SPARK-44563. Authored-by: panbingkun <pbk1982@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Needed for Java 21 compatibility, see apache/arrow#36370
Rationale for this change
Java 21 switched
DirectByteBuffer(long,int)
constructor toDirectByteBuffer(long,long)
via openjdk/jdk@a56598fWhat changes are included in this PR?
In order to avoid
NoSuchMethodException
error in Java 21 environment, this PR aims to choose one of constructors based on the Java version like netty/netty#13366 .Are these changes tested?
Are there any user-facing changes?