Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-45315 Drop JDK 8/11 and make JDK 17 by default
  3. SPARK-45874

Remove Java version check from `IsolatedClientLoader`

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      val rootClassLoader: ClassLoader =
        if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)) {
          // In Java 9, the boot classloader can see few JDK classes. The intended parent
          // classloader for delegation is now the platform classloader.
          // See http://java9.wtf/class-loading/
          val platformCL =
          classOf[ClassLoader].getMethod("getPlatformClassLoader").
            invoke(null).asInstanceOf[ClassLoader]
          // Check to make sure that the root classloader does not know about Hive.
          assert(Try(platformCL.loadClass("org.apache.hadoop.hive.conf.HiveConf")).isFailure)
          platformCL
        } else {
          // The boot classloader is represented by null (the instance itself isn't accessible)
          // and before Java 9 can see all JDK classes
          null
        } 

      Spark 4.0.0 has a minimum requirement of Java 17, so the version check for Java 9 is not necessary.

      Attachments

        Issue Links

          Activity

            People

              LuciferYang Yang Jie
              LuciferYang Yang Jie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: