spark.jobserver.util.ContextURLClassLoader.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spark-jobserver Show documentation
Show all versions of spark-jobserver Show documentation
SnappyData distributed data store and execution engine
The newest version!
package spark.jobserver.util
import java.net.{URLClassLoader, URL}
import org.slf4j.LoggerFactory
/**
* The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
* NOTE: This is copied from Spark's ExecutorURLClassLoader, which is private[spark].
*/
class ContextURLClassLoader(urls: Array[URL], parent: ClassLoader)
extends URLClassLoader(urls, parent) {
val logger = LoggerFactory.getLogger(getClass)
override def addURL(url: URL) {
if (!getURLs.contains(url)) {
super.addURL(url)
logger.info("Added URL " + url + " to ContextURLClassLoader")
}
}
}