Github user alewando commented on a diff in the pull request:
https://github.com/apache/spark/pull/9106#discussion_r41983045
--- Diff:
core/src/main/scala/org/apache/spark/util/MutableURLClassLoader.scala ---
@@ -82,14 +84,9 @@ private[spark] class ChildFirstURLClassLoader(urls:
Array[URL], parent: ClassLoa
}
override def getResources(name: String): Enumeration[URL] = {
- val urls = super.findResources(name)
- val res =
- if (urls != null && urls.hasMoreElements()) {
- urls
- } else {
- parentClassLoader.getResources(name)
- }
- res
+ val childUrls = super.findResources(name).asScala
+ val parentUrls = parentClassLoader.getResources(name).asScala
+ (childUrls ++ parentUrls).asJavaEnumeration
--- End diff --
In my situation, the child classloader _did_ have resources under this
name. With the Typesafe config library, it is typical (and suggested) that
libraries package their own default configurations in a 'reference.conf' file
at the root of their jar, and that applications do the same. All of the found
configuration files are merged together. So in my case, the application
assembly (in the child classloader) has it's own 'reference.conf' resource,
which (due to this issue) is preventing akka's 'reference.conf' resource (in
the parent classloader) from being seen.
---
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]