aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorBryan Cutler <bjcutler@us.ibm.com>2015-11-18 12:09:54 -0800
committerTathagata Das <tathagata.das1565@gmail.com>2015-11-18 12:09:54 -0800
commit31921e0f0bd559d042148d1ea32f865fb3068f38 (patch)
tree9b255bcbce9e85e4aa5b473eee10d7ddd060a45c /project
parent94624eacb0fdbbe210894151a956f8150cdf527e (diff)
downloadspark-31921e0f0bd559d042148d1ea32f865fb3068f38.tar.gz
spark-31921e0f0bd559d042148d1ea32f865fb3068f38.tar.bz2
spark-31921e0f0bd559d042148d1ea32f865fb3068f38.zip
[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.
Diffstat (limited to 'project')
-rw-r--r--project/MimaExcludes.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/project/MimaExcludes.scala b/project/MimaExcludes.scala
index eb70d27c34..bb45d1bb12 100644
--- a/project/MimaExcludes.scala
+++ b/project/MimaExcludes.scala
@@ -142,6 +142,10 @@ object MimaExcludes {
"org.apache.spark.streaming.kafka.KafkaUtilsPythonHelper.createDirectStream"),
ProblemFilters.exclude[MissingMethodProblem](
"org.apache.spark.streaming.kafka.KafkaUtilsPythonHelper.createRDD")
+ ) ++ Seq(
+ // SPARK-4557 Changed foreachRDD to use VoidFunction
+ ProblemFilters.exclude[MissingMethodProblem](
+ "org.apache.spark.streaming.api.java.JavaDStreamLike.foreachRDD")
)
case v if v.startsWith("1.5") =>
Seq(