From 92e333e2add1af1a621bf5595de7a72eed19a358 Mon Sep 17 00:00:00 2001 From: giwa Date: Sun, 3 Aug 2014 19:25:13 -0700 Subject: [PATCH] implemented reduce and count function in Dstream --- python/pyspark/streaming/dstream.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/pyspark/streaming/dstream.py b/python/pyspark/streaming/dstream.py index 76119981b0d9f..9bce826e4a650 100644 --- a/python/pyspark/streaming/dstream.py +++ b/python/pyspark/streaming/dstream.py @@ -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): """