Github user stephenh commented on a diff in the pull request:
https://github.com/apache/spark/pull/3725#discussion_r22001331
--- Diff:
core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
@@ -39,7 +39,17 @@ private[spark] class ChildExecutorURLClassLoader(urls:
Array[URL], parent: Class
super.addURL(url)
}
override def findClass(name: String): Class[_] = {
- super.findClass(name)
+ val loaded = super.findLoadedClass(name)
+ if (loaded != null) {
+ return loaded
+ }
+ try {
+ super.findClass(name)
+ } catch {
+ case e: ClassNotFoundException => {
+ parentClassLoader.loadClass(name)
--- End diff --
This CNFE/call parent is based on the same SO post, which AFAICT might have
even been the inspiration for the original implementation here (the SO post was
linked in one of the original user-first tickets), but this detail got dropped,
I assume accidentally.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]