Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-28380

Build hbase-thirdparty with JDK17

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • java, thirdparty
    • None

    Description

      hbase-thirdparty fails to build with JDK 17. It fails for Unsafe module with following:

      [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]
      

      The code does not compile as there is a breaking change in JKD17 around unsafe usage:

      Need to raise a patch with changes for HBaseUnsafeInternal implementation such that it is compatible (with JDK8) and still works for JDK11 and JDK17.

      Attachments

        Issue Links

          Activity

            People

              nihaljain.cs Nihal Jain
              nihaljain.cs Nihal Jain
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: