Github user BryanCutler commented on the pull request:

    https://github.com/apache/spark/pull/9488#issuecomment-156288069
  
    I tested for binary compatibility by building Spark unmodified from the 1.5 
branch, then compiled with Java 8 an application with the following lambda and 
Function<R, Void> usage:
    
    ```java
            inputStream.foreachRDD(x -> {
                        x.foreach(i -> System.out.println(i.toString()));
                        return null;
                    }
            );
    
            inputStream.foreachRDD(new Function<JavaRDD<Integer>, Void>() {
                @Override
                public Void call(JavaRDD<Integer> x) {
    
                    x.foreach(new VoidFunction<Integer>() {
                        @Override
                        public void call(Integer i) {
                            System.out.println(i.toString());
                        }
                    });
    
                    return null;
                }
            }); 
    
    ```
    I then built Spark from this branch and ran the previously compiled 
application with the new jars, and it ran without any issues.  Let me know if 
there is any more thorough testing we need for this.
    
    btw - I added the test for Java8APISuite and it ran fine, but I noticed 
some other unrelated failures, not sure if these are known or maybe just my 
env, and I didn't get a chance to look into it yet 
    
    ```
    [info] Test org.apache.spark.streaming.Java8APISuite.testForeachRDD started
    [info] Test org.apache.spark.streaming.Java8APISuite.testPairTransform 
started
    [info] Test org.apache.spark.streaming.Java8APISuite.testFilter started
    [error] Test org.apache.spark.streaming.Java8APISuite.testFilter failed: 
java.lang.UnsupportedOperationException: null, took 0.302 sec
    [error]     at java.util.AbstractList.set(AbstractList.java:132)
    [error]     at java.util.AbstractList$ListItr.set(AbstractList.java:426)
    [error]     at java.util.List.sort(List.java:482)
    [error]     at java.util.Collections.sort(Collections.java:141)
    [error]     at 
org.apache.spark.streaming.Java8APISuite.lambda$assertOrderInvariantEquals$1(Java8APISuite.java:442)
    [error]     at java.lang.Iterable.forEach(Iterable.java:75)
    [error]     at 
org.apache.spark.streaming.Java8APISuite.assertOrderInvariantEquals(Java8APISuite.java:442)
    [error]     at 
org.apache.spark.streaming.Java8APISuite.testFilter(Java8APISuite.java:79)
    ```


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