pan3793 commented on PR #46521:
URL: https://github.com/apache/spark/pull/46521#issuecomment-2104034238
I think the case is already covered by CI.
When IsolatedClassLoader is enabled, the `Hive.get` should pull and load
CodeHaus Jackson classes from IsolatedClassLoader.
```
/**
* Initialize Hive through Configuration.
* First try to use getWithoutRegisterFns to initialize to avoid loading
all functions,
* if there is no such method, fallback to Hive.get.
*/
def getHive(conf: Configuration): Hive = {
val hiveConf = conf match {
case hiveConf: HiveConf =>
hiveConf
case _ =>
new HiveConf(conf, classOf[HiveConf])
}
try {
Hive.getWithoutRegisterFns(hiveConf)
} catch {
// SPARK-37069: not all Hive versions have the above method (e.g.,
Hive 2.3.9 has it but
// 2.3.8 don't), therefore here we fallback when encountering the
exception.
case _: NoSuchMethodError =>
Hive.get(hiveConf)
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]