[
https://issues.apache.org/jira/browse/HBASE-28380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18009858#comment-18009858
]
Nihal Jain commented on HBASE-28380:
------------------------------------
Checkout release notes of https://issues.apache.org/jira/browse/HBASE-29225
{quote}We add two new set of modules which we will use for Jetty 12 migration:
* hbase-shaded-jetty-12-plus-core: Contains shaded jetty 12 core jars
* hbase-shaded-jetty-12-plus-ee8: Contains shaded jetty EE8 specific jars
Also now to build hbase-thirdparty, we need both JDK 8 and JDK 17. For this,
developers need to setup toolchains in their systems. Going forward we will be
compiling all the modules except hbase-unsafe and hbase-shaded-protobuf with
JDK 17 but targeted to JDK 8 release. For hbase-unsafe and
hbase-shaded-protobuf, they will build as usual with JDK 8. Also we have
relieved enforcer to enforce JDK17 bytecode for jetty-12-plus-* modules only.
{quote}
> [hbase-thirdparty] Build hbase-unsafe and hbase-shaded-protobuf with JDK17
> --------------------------------------------------------------------------
>
> Key: HBASE-28380
> URL: https://issues.apache.org/jira/browse/HBASE-28380
> Project: HBase
> Issue Type: Improvement
> Components: java, thirdparty
> Reporter: Nihal Jain
> Assignee: Nihal Jain
> Priority: Major
>
> hbase-thirdparty fails to build with JDK 17. It fails for Unsafe module with
> following:
> {code:java}
> [INFO] Apache HBase Third-Party Libs ...................... SUCCESS [ 5.138
> s]
> [INFO] Apache HBase Patched and Relocated (Shaded) Protobuf SUCCESS [ 17.888
> s]
> [INFO] Apache HBase Relocated (Shaded) Netty Libs ......... SUCCESS [02:19
> min]
> [INFO] Apache HBase Relocated (Shaded) netty-tcnative Libs SUCCESS [ 46.429
> s]
> [INFO] Apache HBase Relocated (Shaded) GSON Libs .......... SUCCESS [ 1.021
> s]
> [INFO] Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs SUCCESS
> [ 8.435 s]
> [INFO] Apache HBase Relocated (Shaded) Jetty Libs ......... SUCCESS [ 4.972
> s]
> [INFO] Apache HBase Relocated (Shaded) Jersey Libs ........ SUCCESS [ 11.526
> s]
> [INFO] Apache HBase Relocated (Shaded) jackson-jaxrs-json-provider SUCCESS [
> 1.421 s]
> [INFO] Apache HBase Unsafe Wrapper ........................ FAILURE [ 0.331
> s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 03:57 min
> [INFO] Finished at: 2024-02-16T07:20:20Z
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
> (default-compile) on project hbase-unsafe: Compilation failure: Compilation
> failure:
> [ERROR]
> /workspace/hbase/hbase-unsafe/src/main/java/org/apache/hadoop/hbase/unsafe/HBaseUnsafeInternal.java:[259,18]
> cannot find symbol
> [ERROR] symbol: method
> defineClass(java.lang.String,byte[],int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
> [ERROR] location: variable UNSAFE of type sun.misc.Unsafe
> [ERROR]
> /workspace/hbase/hbase-unsafe/src/main/java/org/apache/hadoop/hbase/unsafe/HBaseUnsafeInternal.java:[263,18]
> cannot find symbol
> [ERROR] symbol: method defineAnonymousClass(java.lang.Class<capture#1 of
> ?>,byte[],java.lang.Object[])
> [ERROR] location: variable UNSAFE of type sun.misc.Unsafe
> [ERROR] -> [Help 1]
> {code}
> The code does not compile as there is a breaking change in JKD17 around
> unsafe usage:
> * [https://bugs.openjdk.org/browse/JDK-8266760]
> * [https://bugs.openjdk.org/browse/JDK-8199699]
> Need to raise a patch with changes for HBaseUnsafeInternal implementation
> such that it is compatible (with JDK8) and still works for JDK11 and JDK17.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)