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 2021/01/28 09:57:43 UTC
[GitHub] [spark] yaooqinn commented on a change in pull request #25775: [SPARK-29015][SQL][test-hadoop3.2]Reset class loader after initializing SessionState for built-in Hive 2.3
yaooqinn commented on a change in pull request #25775:
URL: https://github.com/apache/spark/pull/25775#discussion_r565960900
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -190,6 +190,13 @@ private[hive] class HiveClientImpl(
if (clientLoader.cachedHive != null) {
Hive.set(clientLoader.cachedHive.asInstanceOf[Hive])
}
+ // Hive 2.3 will set UDFClassLoader to hiveConf when initializing SessionState
+ // since HIVE-11878, and ADDJarCommand will add jars to clientLoader.classLoader.
+ // For this reason we cannot load the jars added by ADDJarCommand because of class loader
+ // got changed. We reset it to clientLoader.ClassLoader here.
+ if (HiveUtils.isHive23) {
Review comment:
Why not set the classLoader blindly to `clientLoader.classLoader`? HIVE-11878 got merged into hive 1.3.0 and 2.0.0? This issue can still exist in the production environment when we try to use non-builtin hive libraries.
cc @ulysses-you @cloud-fan @wangyum @AngersZhuuuu
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org