[ 
https://issues.apache.org/jira/browse/SPARK-4877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14309666#comment-14309666
 ] 

Josh Rosen commented on SPARK-4877:
-----------------------------------

I've gone ahead and committed this PR because it fixes a known bug and adds a 
new test case.  Both the old and new code overloaded findClass; I think the 
findClass vs. loadClass change is related to the this JIRA, but kind of 
orthogonal to the fix here.  If you think that we should re-work our 
classloader to change its overriding strategy, let's do that in a separate 
followup PR.

> userClassPathFirst doesn't handle user classes inheriting from parent
> ---------------------------------------------------------------------
>
>                 Key: SPARK-4877
>                 URL: https://issues.apache.org/jira/browse/SPARK-4877
>             Project: Spark
>          Issue Type: Bug
>          Components: Spark Core
>    Affects Versions: 1.2.0
>            Reporter: Stephen Haberman
>            Assignee: Stephen Haberman
>             Fix For: 1.3.0
>
>
> We're trying out userClassPathFirst.
> To do so, we make an uberjar that does not contain Spark or Scala classes 
> (because we want those to load from the parent classloader, otherwise we'll 
> get errors like scala.Function0 != scala.Function0 since they'd load from 
> different class loaders).
> (Tangentially, some isolation classloaders like Jetty whitelist certain 
> packages, like spark/* and scala/*, to only come from the parent classloader, 
> so that technically if the user still messes up and leaks the Scala/Spark 
> jars into their uberjar, it won't blow up; this would be a good enhancement, 
> I think.)
> Anyway, we have a custom Kryo registrar, which ships in our uberjar, but 
> since it "extends spark.KryoRegistrator", which is not in our uberjar, we get 
> a ClassNotFoundException.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to