[
https://issues.apache.org/jira/browse/SPARK-45874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun reassigned SPARK-45874:
-------------------------------------
Assignee: Yang Jie
> Remove Java version check from `IsolatedClientLoader`
> -----------------------------------------------------
>
> Key: SPARK-45874
> URL: https://issues.apache.org/jira/browse/SPARK-45874
> Project: Spark
> Issue Type: Sub-task
> Components: SQL
> Affects Versions: 4.0.0
> Reporter: Yang Jie
> Assignee: Yang Jie
> Priority: Minor
> Labels: pull-request-available
>
> {code:java}
> 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
> } {code}
> Spark 4.0.0 has a minimum requirement of Java 17, so the version check for
> Java 9 is not necessary.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]