You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/13 14:37:10 UTC

[GitHub] [spark] srowen commented on a change in pull request #25429: [SPARK-28708][SQL] IsolatedClientLoader will not load hive classes from application jars on JDK9+

srowen commented on a change in pull request #25429: [SPARK-28708][SQL] IsolatedClientLoader will not load hive classes from application jars on JDK9+
URL: https://github.com/apache/spark/pull/25429#discussion_r313433441
 
 

 ##########
 File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala
 ##########
 @@ -338,18 +338,20 @@ private[spark] object HiveUtils extends Logging {
       }
 
       val classLoader = Utils.getContextOrSparkClassLoader
-      val jars = allJars(classLoader)
-      if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)) {
+      val jars: Array[URL] = if (SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_9)) {
         // Do nothing. The system classloader is no longer a URLClassLoader in Java 9,
         // so it won't match the case in allJars above. It no longer exposes URLs of
 
 Review comment:
   Maybe remove the word 'above' in the comment.
   Hm, so this resolves the problem? That's great. But I wonder why. In Java 9+, won't `allJars` already return nothing? I remember that was why I made this change to avoid the check for no JARs. But does it pick something up in some cases? OK makes some sense.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org