You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by holdenk <gi...@git.apache.org> on 2014/03/24 23:18:51 UTC

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

GitHub user holdenk opened a pull request:

    https://github.com/apache/spark/pull/217

    [WIP] Spark 939 allow user jars to take precedence over spark jars

    I still need to do a small bit of re-factoring [mostly the one Java file I'll switch it back to a Scala file and use it in both the close loaders], but comments on other things I should do would be great.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/holdenk/spark spark-939-allow-user-jars-to-take-precedence-over-spark-jars

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/217.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #217
    
----
commit bc2491756800b2712f0d927f3d889499448235a8
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-21T06:15:57Z

    One loader workers.

commit b1729d179195e39cff553c0d05d972552bc7abec
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-21T21:14:04Z

    Both class loaders compile. Now for testing

commit 01ef4df251aadf143706f88ce7cb19a0ad3d8d6c
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-21T21:15:07Z

    Adda FakeClass for testing ClassLoader precedence options

commit 9e8b94d38d7f7403c8d8166c15a492f6233111e0
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-21T22:20:36Z

    Doesn't quite work

commit 75aeade7a3a0d08548ab2e649f18c43d32463f98
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-22T23:50:58Z

    Almost works

commit de85b5d34602b9f1282a498483877062c3cab31c
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T00:11:37Z

    Clean up

commit ac8acbac1073da9f153503691a71755ad018e1d5
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T02:21:28Z

    Add a test suite for the executor url class loader suite

commit 7e4f73c668f3aad87b68eace2dc69c2f4efa7df5
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T02:35:45Z

    Remove bad import'

commit 30b152914f871e06d70951eb60622a6fc2dd5d56
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T02:37:28Z

    Does not depend on being in my home directory

commit d7d32eda508dd9272f3dd504c5de514f5554a713
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T04:15:48Z

    It works ish

commit f09425756a0c5e6eea63e0400aff0ffa78678ee8
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T04:22:20Z

    It works comrade

commit 2af05d8bf8e5a8022d59a67413afcb130cc3b8d8
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-23T04:22:41Z

    Test are good

commit 93c71dca87a36d5d50787cfe7ed66f7f8b079376
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-24T22:06:55Z

    Fix parent calling class loader issue

commit 0bd8d926e8d982d37367549e6dc0a9f9d48c3a7d
Author: Holden Karau <ho...@pigscanfly.ca>
Date:   2014-03-24T22:16:12Z

    Fix fall back with custom class loader and add a test for it

----


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917773
  
    --- Diff: core/src/main/java/org/apache/spark/util/ParentClassLoader.java ---
    @@ -0,0 +1,37 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.util;
    +
    +/**
    + * A class loader which makes findClass accesible to the child
    + */
    +public class ParentClassLoader extends ClassLoader {
    --- End diff --
    
    Would you mind writing this in scala?


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517529
  
     Build triggered.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38512141
  
    @holdenk checkout .rat-excludes


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38536347
  
     Build triggered.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38604429
  
    Removing WIP tag, it should be good to go.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39820352
  
    Merged build finished. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38881854
  
    Can one of the admins verify this patch?


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38539226
  
    Build finished.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917613
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    --- End diff --
    
    What about calling this `MutableURLClassLoader`? What do you think? For some reason `Addable` just doesn't sound right to me.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38523920
  
     Build triggered.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38523921
  
    Build started.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917557
  
    --- Diff: project/SparkBuild.scala ---
    @@ -182,7 +182,6 @@ object SparkBuild extends Build {
         concurrentRestrictions in Global += Tags.limit(Tags.Test, 1),
     
         resolvers ++= Seq(
    -      // HTTPS is unavailable for Maven Central
    --- End diff --
    
    Why remove this comment? 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11378988
  
    --- Diff: repl/src/main/scala/org/apache/spark/repl/ExecutorClassLoader.scala ---
    @@ -26,21 +26,28 @@ import org.apache.hadoop.fs.{FileSystem, Path}
     
     import org.apache.spark.SparkEnv
     import org.apache.spark.util.Utils
    -
    +import org.apache.spark.util.ParentClassLoader
     
     import com.esotericsoftware.reflectasm.shaded.org.objectweb.asm._
     import com.esotericsoftware.reflectasm.shaded.org.objectweb.asm.Opcodes._
     
    -
     /**
      * A ClassLoader that reads classes from a Hadoop FileSystem or HTTP URI,
      * used to load classes defined by the interpreter when the REPL is used
      */
     class ExecutorClassLoader(classUri: String, parent: ClassLoader)
    -extends ClassLoader(parent) {
    +extends FlexibleExecutorClassLoader(classUri, parent, false) {
    +}
    +/**
    + * Allows the user to specify if user class path should be first
    + */ 
    +class FlexibleExecutorClassLoader(classUri: String, parent: ClassLoader,
    +  userClassPathFirst: Boolean) extends ClassLoader {
    --- End diff --
    
    this indent should be four spaces to differentiate from the function body


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39884606
  
    Merged build started. 


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917799
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    +  def addURL(url: URL)
    +  def getURLs(): Array[URL]
    +}
    +
    +private[spark] class ChildExecutorURLClassLoader(urls: Array[URL], parent: ClassLoader)
    +  extends ClassLoader with AddableURLClassLoader {
    --- End diff --
    
    I think it's sufficient to just say "extends AddableURLClassLoader"


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39820273
  
    Merged build started. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39825018
  
    Merged build finished. 


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917644
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    --- End diff --
    
    This should also be `private[spark]`


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38533830
  
     Build triggered.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38539229
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13427/


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38533060
  
    So when we extend a classloader and provide the parent the loadClass function will resolve through the parent rather than the child which is why we avoid it for the Child case and use it in the parent case.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517593
  
    Build finished.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by mateiz <gi...@git.apache.org>.
Github user mateiz commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39594472
  
    @pwendell are we allowed to have JARs and .class files in our repo, even for testing? If not we'll need to modify the tests here to build them.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38534174
  
    Build finished.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38518049
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13412/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11378555
  
    --- Diff: core/src/main/scala/org/apache/spark/TestUtils.scala ---
    @@ -42,6 +42,20 @@ object TestUtils {
       }
     
       /**
    +   * Create a jar that defines classes with the given names.
    +   *
    +   * Note: if this is used during class loader tests, class names should be unique
    +   * in order to avoid interference between tests.
    +   */
    +  def createJarWithClassesAndValue(classNames: Seq[String], value: Integer): URL = {
    --- End diff --
    
    I'd also just consolidate these by having `createJarWithClasses` call this and pass an unused value.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517977
  
     Build triggered.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39821371
  
    Merged build started. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11378521
  
    --- Diff: core/src/main/scala/org/apache/spark/TestUtils.scala ---
    @@ -95,4 +109,22 @@ object TestUtils {
         result.renameTo(out)
         out
       }
    +
    +  /** Creates a compiled class with the given name. Class file will be placed in destDir. */
    --- End diff --
    
    This is very redundant with `createCompiledClass`. Why not just make the `value` optional and we can have a default (there is no harm in having an extra field even if some tests might not use it). Also maybe the value should be a `String` here since it gets stringified anyways.
    



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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917645
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    --- End diff --
    
    Sounds reasonable.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38508778
  
    oh hmm... the manifest files failed the Apache RAT test. I'll see if I can make my tests work without them.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517979
  
    Build started.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38508539
  
     Merged build triggered.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39815148
  
    Merged build started. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39884584
  
     Merged build triggered. 


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38508629
  
    Merged build finished.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39821357
  
     Merged build triggered. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11416985
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
    @@ -310,11 +314,14 @@ private[spark] class Executor(
         val classUri = conf.get("spark.repl.class.uri", null)
         if (classUri != null) {
           logInfo("Using REPL class URI: " + classUri)
    +      val userClassPathFirst: java.lang.Boolean =
    +        conf.getBoolean("spark.classpath.userClassPathFirst", false)
    --- End diff --
    
    Needs docs (note to self)


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517530
  
    Build started.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38512156
  
    you can just ignore those files


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39630090
  
    1) What do you mean "not be in the Spark project"? Do you mean the package name associated with the class? The tool now just creates classes in the default (i.e. no) package.
    2) There is a function createCompiledClass that will generate a class file... that enough?
    3) For this one you might need to extend the test utility a bit. The simplest way might be to add a static field to all classes with a version (`static int version = $version;`) and you can pass an optional version in createCompiledClass with a version, which could just default to 1.



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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38535950
  
    @AmplabJenkins jenkins,  retest this please


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38534295
  
    @AmplabJenkins retest this please


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38526642
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13415/


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38508630
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13408/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/217


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10918126
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    +  def addURL(url: URL)
    +  def getURLs(): Array[URL]
    +}
    +
    +private[spark] class ChildExecutorURLClassLoader(urls: Array[URL], parent: ClassLoader)
    +  extends ClassLoader with AddableURLClassLoader {
    +
    +  object userClassLoader extends URLClassLoader(urls, null){
    --- End diff --
    
    When I do it as a val rather than an object the methods aren't accessible. I made it a private object, does that help?


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38526640
  
    Build finished.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38536348
  
    Build started.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39815228
  
    Merged build finished. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39820263
  
     Merged build triggered. 


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39626705
  
    I don't know for sure, but ya I'd guess `.class` files might be an issue. @holdenk would it be possible to re-write the tests using this utility here https://github.com/apache/spark/pull/326/files#diff-80212629295b483ab30a3436a653e97aR37?
    
    Basically you can create a Jar with an arbitrary named class and then add that to the classloader.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917629
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    +  def addURL(url: URL)
    +  def getURLs(): Array[URL]
    --- End diff --
    
    For getters like this scala style is to do `def getUrls: Array[URL]`


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38534176
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13424/


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38518047
  
    Build finished.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917591
  
    --- Diff: project/SparkBuild.scala ---
    @@ -182,7 +182,6 @@ object SparkBuild extends Build {
         concurrentRestrictions in Global += Tags.limit(Tags.Test, 1),
     
         resolvers ++= Seq(
    -      // HTTPS is unavailable for Maven Central
    --- End diff --
    
    My bad, I think that came while I was merging (I'd removed https on my own as part of getting it to build.) I'll put this back in.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38533831
  
    Build started.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38508541
  
    Merged build started.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917718
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    +  def addURL(url: URL)
    +  def getURLs(): Array[URL]
    +}
    +
    +private[spark] class ChildExecutorURLClassLoader(urls: Array[URL], parent: ClassLoader)
    +  extends ClassLoader with AddableURLClassLoader {
    +
    +  object userClassLoader extends URLClassLoader(urls, null){
    +    override def addURL(url: URL) {
    +      super.addURL(url)
    +    }
    +    override def findClass(name: String): Class[_] = { 
    +      super.findClass(name)
    +    }
    +  }
    +
    +  val parentClassLoader = new ParentClassLoader(parent)
    --- End diff --
    
    private


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39825020
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13889/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39890433
  
    All automated tests passed.
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13900/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11416979
  
    --- Diff: core/src/main/scala/org/apache/spark/TestUtils.scala ---
    @@ -34,13 +34,14 @@ object TestUtils {
        * Note: if this is used during class loader tests, class names should be unique
        * in order to avoid interference between tests.
        */
    -  def createJarWithClasses(classNames: Seq[String]): URL = {
    +  def createJarWithClasses(classNames: Seq[String], value: String = ""): URL = {
    --- End diff --
    
    This class will need to be made package private if it goes into `main` instead of `test`. I can do this when merging, just putting a reminder here.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39820353
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13888/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39630440
  
    On Friday, April 4, 2014, Patrick Wendell <no...@github.com> wrote:
    
    > 1) What do you mean "not be in the Spark project"? Do you mean the package
    > name associated with the class? The tool now just creates classes in the
    > default (i.e. no) package.
    >
    Yup :)
    
    >
    > 2) There is a function createCompiledClass that will generate a class
    > file... that enough?
    >
    Sure
    
    >
    > 3) For this one you might need to extend the test utility a bit. The
    > simplest way might be to add a static field to all classes with a version (static
    > int version = $version;) and you can pass an optional version in
    > createCompiledClass with a version, which could just default to 1.
    >
    Yah I think that sounds like a good solution. I'll rebase my branch
    tomorrow and do this :)
    
    
    
    > --
    > Reply to this email directly or view it on GitHub<https://github.com/apache/spark/pull/217#issuecomment-39630090>
    > .
    >
    
    
    -- 
    Cell : 425-233-8271


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by holdenk <gi...@git.apache.org>.
Github user holdenk commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39628786
  
    That code looks useful :) Just a heads up though its probably going to be a
    bit ugly since:
    1) I need the classes to not be in the Spark project its self (so I'll
    probably create the java classes from strings)
    2) I need both classes and jars (one of the loaders is specialized for just
    .class files with the rewriting panda magic)
    3) I need multiple classes with the same name name but different values for
    testing
    
    
    On Fri, Apr 4, 2014 at 7:27 PM, Patrick Wendell <no...@github.com>wrote:
    
    > I don't know for sure, but ya I'd guess .class files might be an issue.
    > @holdenk <https://github.com/holdenk> would it be possible to re-write
    > the tests using this utility here
    > https://github.com/apache/spark/pull/326/files#diff-80212629295b483ab30a3436a653e97aR37
    > ?
    >
    > Basically you can create a Jar with an arbitrary named class and then add
    > that to the classloader.
    >
    > --
    > Reply to this email directly or view it on GitHub<https://github.com/apache/spark/pull/217#issuecomment-39626705>
    > .
    >
    
    
    
    -- 
    Cell : 425-233-8271


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39815229
  
    
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13881/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39929991
  
    Thanks - merged with some minor changes.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-38517594
  
    One or more automated tests failed
    Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/13409/


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39890430
  
    Merged build finished. All automated tests passed.


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r11378778
  
    --- Diff: repl/src/main/scala/org/apache/spark/repl/ExecutorClassLoader.scala ---
    @@ -26,21 +26,28 @@ import org.apache.hadoop.fs.{FileSystem, Path}
     
     import org.apache.spark.SparkEnv
     import org.apache.spark.util.Utils
    -
    +import org.apache.spark.util.ParentClassLoader
     
     import com.esotericsoftware.reflectasm.shaded.org.objectweb.asm._
     import com.esotericsoftware.reflectasm.shaded.org.objectweb.asm.Opcodes._
     
    -
     /**
      * A ClassLoader that reads classes from a Hadoop FileSystem or HTTP URI,
      * used to load classes defined by the interpreter when the REPL is used
      */
     class ExecutorClassLoader(classUri: String, parent: ClassLoader)
    -extends ClassLoader(parent) {
    +extends FlexibleExecutorClassLoader(classUri, parent, false) {
    --- End diff --
    
    Can we just rename this to `ExecutorClassLoader`. Int he current implementation the `ExecutorClassLoader` class is not used.


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

[GitHub] spark pull request: [WIP] Spark 939 allow user jars to take preced...

Posted by pwendell <gi...@git.apache.org>.
Github user pwendell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/217#discussion_r10917691
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/ExecutorURLClassLoader.scala ---
    @@ -19,13 +19,56 @@ package org.apache.spark.executor
     
     import java.net.{URLClassLoader, URL}
     
    +import org.apache.spark.util.ParentClassLoader
    +
     /**
      * The addURL method in URLClassLoader is protected. We subclass it to make this accessible.
    + * We also make changes so user classes can come before the default classes.
      */
    +
    +trait AddableURLClassLoader extends ClassLoader {
    +  def addURL(url: URL)
    +  def getURLs(): Array[URL]
    +}
    +
    +private[spark] class ChildExecutorURLClassLoader(urls: Array[URL], parent: ClassLoader)
    +  extends ClassLoader with AddableURLClassLoader {
    +
    +  object userClassLoader extends URLClassLoader(urls, null){
    --- End diff --
    
    Why is this an `object` rather than a `val`? What are the semantics of an inner-object like this... is it static?
    
    ```
      val userClassLoader = new URLClassLoader(urls, null) {
        override def addURL(url: URL) {
          super.addURL(url)
        }
        override def findClass(name: String): Class[_] = { 
          super.findClass(name)
        }
      }
    ```


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

[GitHub] spark pull request: Spark 939 allow user jars to take precedence o...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/217#issuecomment-39815143
  
     Merged build triggered. 


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