Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38531643
  
    One thing I notice here is that the type hierarchy has gotten a little 
complex. What if instead of a trait and two types you just had:
    ```
    // A mutable class loader
    class MutableURLClassLoader(urls: Array[URL], parent: ClassLoader) extends 
URLClassLoader(urls, parent) {
      override def addURL(url: URL) {
        super.addURL(url)
      }
    }
    
    // A mutable class loader that is child-first
    private[spark] class ChildMutableURLClassLoader(urls: Array[URL], parent: 
ClassLoader)
      extends MutableURLClassLoader(urls, parent) {
    ```
    
    The you could do away with the `Executor` in the names everywhere (it 
doesn't really convey any meaning). Then you'd have something like:
    ```
    userClassPathFirst match {
          case true => new ChildMutableURLClassLoader(urls, loader)
          case false => new MutableURLClassLoader(urls, loader)
        }
    ```
    
    Would that be possible?


---
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.
---

Reply via email to