Skip to content

Commit

Permalink
implemented reduce and count function in Dstream
Browse files Browse the repository at this point in the history
  • Loading branch information
giwa committed Sep 20, 2014
1 parent 1b83354 commit 92e333e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/pyspark/streaming/dstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def _sum(self):
"""
Add up the elements in this DStream.
"""
pass
#return self._mapPartitions(lambda x: [sum(x)]).reduce(operator.add)
return self._mapPartitions(lambda x: [sum(x)]).reduce(operator.add)

def print_(self, label=None):
"""
Expand Down

0 comments on commit 92e333e

Please sign in to comment.