You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by stephenh <gi...@git.apache.org> on 2015/02/04 16:41:59 UTC

[GitHub] spark pull request: SPARK-5358: Rework the classloader impelementa...

Github user stephenh commented on the pull request:

    https://github.com/apache/spark/pull/4166#issuecomment-72877246
  
    @MattWhelan I believe you that loadClass is preferable to findClass, but can you articulate why? And maybe as a comment on this SO post so that future people that copy/paste from the 1st answer can know as well? :-)
    
    http://stackoverflow.com/questions/5445511/how-do-i-create-a-parent-last-child-first-classloader-in-java-or-how-to-overr
    
    Tangentially, I'd eventually like to port/copy/paste the Hadoop ApplicationClassLoader (which I believe they copy/pasted from Jetty) so that we can ignore any org.apache.spark.* classes that might accidentally be in the user's jar:
    
    https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ApplicationClassLoader.java
    
    I'm also half-tempted to copy/paste their ApplicationClassLoader into a separate utility project, so that going forward Jetty/Hadoop/Spark/etc. could all reuse the same tested functionality instead of copy/pasting the code around. But then I'd have to publish to maven central, it'd be another dependency to worry about, etc., etc...


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org