Skip to content

Commit 92e333e

Browse files
committed
implemented reduce and count function in Dstream
1 parent 1b83354 commit 92e333e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

python/pyspark/streaming/dstream.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ def _sum(self):
5656
"""
5757
Add up the elements in this DStream.
5858
"""
59-
pass
60-
#return self._mapPartitions(lambda x: [sum(x)]).reduce(operator.add)
59+
return self._mapPartitions(lambda x: [sum(x)]).reduce(operator.add)
6160

6261
def print_(self, label=None):
6362
"""

0 commit comments

Comments
 (0)