Github user rcsenkbeil commented on the pull request:

    https://github.com/apache/spark/pull/1929#issuecomment-53512263
  
    Awesome! Great find, @heathermiller! I've added an additional commit to 
move to that solution. @mateiz, what do you think now? This is what Global 
itself does to reinitialize. Is that clean enough?
    
    FYI, I ran through tests with both Scala and Java classes (from within 
jars) and everything checks out.
    
    I also added the SparkContext.addJar call as you requested to make this 
more Sparkish.
    
    I tested this by starting up a standalone cluster using the 
`sbin/start-all.sh` script to launch a cluster with a single worker and 
connecting using 
    `./bin/spark-shell --master spark://rcsenkbe.local:7077`. 
    
    I'm hoping this demonstrates that the jars also work on the remote cluster. 
I don't have access to a remote Spark cluster at the moment.
    
    ![screen shot 2014-08-26 at 7 18 16 
pm](https://cloud.githubusercontent.com/assets/2481802/4053710/62a9cdba-2d80-11e4-82a1-ace9c189b8cf.png)
    
    The Java implementation:
    ```
    package my.java;
    
    public class MyJavaClass {
        public int add(int x, int y) {
            return x + y;
        }
    }
    ```
    
    The Scala implementation:
    ```
    package my.scala
    
    class MyScalaClass {
        def add(x: Int, y: Int) = x + y
    }
    ```
    
    ![screen shot 2014-08-26 at 7 20 58 
pm](https://cloud.githubusercontent.com/assets/2481802/4053711/62b0d6b4-2d80-11e4-9ea5-c23b19b7cac2.png)
    ![screen shot 2014-08-26 at 7 21 30 
pm](https://cloud.githubusercontent.com/assets/2481802/4053712/62b1c0d8-2d80-11e4-938e-2d11edd3a86b.png)
    ![screen shot 2014-08-26 at 7 22 25 
pm](https://cloud.githubusercontent.com/assets/2481802/4053714/62b79558-2d80-11e4-9aa4-cc6bc48cfeab.png)
    ![screen shot 2014-08-26 at 7 23 04 
pm](https://cloud.githubusercontent.com/assets/2481802/4053713/62b6d88e-2d80-11e4-943b-62080993035e.png)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to