Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-17177 Java 17 support
  3. HADOOP-18862

[JDK17] MiniYarnClusters don't launch in hadoop-aws integration tests

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • fs/s3
    • None

    Description

      I've tried running hadoop-aws tests under java17; everything which tries to launch a MiniYarnCluster fails because google guice is trying to stuff in java.land module that is now forbidden

      Caused by: java.lang.ExceptionInInitializerError: Exception com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @7ee7980d [in thread "Thread-109"]
      
      

      short term fix is to add the params to the surefire and failsafe jvm launcher to allow access

      --add-opens java.base/java.lang=ALL-UNNAMED
      
      

      I don't know if updating guice will make it go away completely. if it doesn't then the history server itself needs to be launched with this

      rather than just add an option for hadoop-aws, we ought to consider a general cross-module variable for junit.jvm.options which is set everywhere; the base impl is "" and a java profile could add the new stuff

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: