We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5431f61 commit 328139bCopy full SHA for 328139b
streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala
@@ -624,7 +624,8 @@ abstract class DStream[T: ClassTag] (
624
* 'this' DStream will be registered as an output stream and therefore materialized.
625
*/
626
def foreachRDD(foreachFunc: RDD[T] => Unit): Unit = ssc.withScope {
627
- this.foreachRDD((r: RDD[T], t: Time) => foreachFunc(r))
+ val cleanedF = context.sparkContext.clean(foreachFunc)
628
+ this.foreachRDD((r: RDD[T], t: Time) => cleanedF(r))
629
}
630
631
/**
0 commit comments