-
- Downloads
[SPARK-4557][STREAMING] Spark Streaming foreachRDD Java API method should...
[SPARK-4557][STREAMING] Spark Streaming foreachRDD Java API method should accept a VoidFunction<...> Currently streaming foreachRDD Java API uses a function prototype requiring a return value of null. This PR deprecates the old method and uses VoidFunction to allow for more concise declaration. Also added VoidFunction2 to Java API in order to use in Streaming methods. Unit test is added for using foreachRDD with VoidFunction, and changes have been tested with Java 7 and Java 8 using lambdas. Author: Bryan Cutler <bjcutler@us.ibm.com> Closes #9488 from BryanCutler/foreachRDD-VoidFunction-SPARK-4557.
Showing
- core/src/main/java/org/apache/spark/api/java/function/VoidFunction2.java 27 additions, 0 deletions...ava/org/apache/spark/api/java/function/VoidFunction2.java
- extras/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java 26 additions, 0 deletions...c/test/java/org/apache/spark/streaming/Java8APISuite.java
- project/MimaExcludes.scala 4 additions, 0 deletionsproject/MimaExcludes.scala
- streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaDStreamLike.scala 23 additions, 1 deletion...org/apache/spark/streaming/api/java/JavaDStreamLike.scala
- streaming/src/test/java/org/apache/spark/streaming/JavaAPISuite.java 40 additions, 1 deletion...rc/test/java/org/apache/spark/streaming/JavaAPISuite.java
Loading
Please register or sign in to comment