Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
-
Introduced a new hbase-unsafe module in hbase-thirdparty.
Description
For java 9+, sun.misc.Unsafe is in the module jdk.unsupported. When compiling with java 11 --release 8, these symbols will not be exported and lead to compile errors.
There is a jdk issue
https://bugs.openjdk.java.net/browse/JDK-8214165
But seems the jdk team does not want to fix it. So if we want to move up to java 11 but still keep the java 8 compatibility, a possible choice is to remove the direct reference of sun.misc.Unsafe so at compile time there will be no problem, and at runtime we export the jdk.unsupported so there will be no problem too.
For more details, please see the discussion of this thread on the dev mailing list.
Attachments
Issue Links
- blocks
-
HBASE-25465 Use javac --release option for supporting cross version compilation
-
- Resolved
-
- is related to
-
HBASE-28380 [hbase-thirdparty] Build hbase-unsafe and hbase-shaded-protobuf with JDK17
-
- Open
-
- relates to
-
PHOENIX-7037 Use or clone hbase-unsafe in Phoenix
-
- Open
-
- links to