Print warning message instead of throwing exception for unsupported Java versions#282
Print warning message instead of throwing exception for unsupported Java versions#282pan3793 wants to merge 2 commits into
Conversation
|
@leerho @tisonkun, this implements my idea proposed at #280 (comment), do you think it's ok? |
|
A whole bunch of internal calls (especially from Unsafe) changed starting with Java 23, and that affects over 100 places in the code. |
|
This code will absolutely not work for LTS Java versions greater than 21. And what I mean by "work" is that all the functionality works and not just some minor subset. |
I do run the unit test, and all unit tests pass under JDK 25.0.3 except for |
some of the unsafe methods are marked as deprecated for removal in JDK 23, but the removal does not happen, at least in JDK 25, can you point out a concrete example that does not work in JDK 25? |
|
Why do you want this to work in Java 25? You should be using the native FFM features in Java 25. |
@leerho I think this is the issue. That Spark requires to work on Java 17, 21, and 25 so they cannot depend on the new datasketches-java because it doesn't work on 17/21 (IIUC). And they can't depend on datasketches-memory if this test case fail some of their workflows would fail. |
|
This is new information to me and the first time anyone has informed me about this restriction. I have just today submitted RC2 of a new version of DS-memory. I will have to cancel and resubmit an RC3. |
I think I explained it at the beginning #270 (comment)
In practice, upgrading JDK for Hadoop and Spark involves many issues that need to be addressed, including GC, JIT, bugs, etc., so it's a hard requirement to allow users to exercise the software with the newer LTS JDK alongside before escalating the minimum JDK version. |
|
I made minimal changes to make it runnable with JDK 25, and manually tested all UTs pass with JDK 17, 21, and 25 now.
|
Sorry, but that statement did not convey to me what @tisonkun clarified:
Even if I fix DS-Memory, it will be a while until I have DS-Java able to simultaneously operate across 17, 21, and 25. I will be lucky if I could get that done this year. I do have a question: Is DS-Memory being used in Spark independent of its use by DS-Java? |
No, Spark uses DS-Java.
If it can be released before 2027.2, Spark is likely to include it in 5.x. |
|
Also, the current version of DS-Memory 7.0.0 that I am releasing is a single source multi-project (one root with two sub-projects) and produces two Jars, one for Java 11 with full capabilities, and a separate jar for Java 17 & 21 but without the capability to create and manage off-heap memory-mapped files. Even if I make it possible for the second jar to operate with Java 25, it still will not be able to create and manage off-heap memory-mapped files. |
it's also fine, Spark currently does not use DS-memory off-heap mode |
|
Thanks again for new information 🙂 |
My local test shows it also works with JDK 25.