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 bebeb4a commit 02d0575Copy full SHA for 02d0575
python/pyspark/streaming/dstream.py
@@ -150,6 +150,9 @@ def foreachRDD(self, func):
150
"""
151
Apply a function to each RDD in this DStream.
152
153
+ if func.func_code.co_argcount == 1:
154
+ old_func = func
155
+ func = lambda t, rdd: old_func(rdd)
156
jfunc = TransformFunction(self._sc, func, self._jrdd_deserializer)
157
api = self._ssc._jvm.PythonDStream
158
api.callForeachRDD(self._jdstream, jfunc)
0 commit comments