Skip to content

Commit

Permalink
remove waste duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
giwa committed Sep 20, 2014
1 parent c5ecfc1 commit 2a06cdb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/pyspark/streaming/dstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

from collections import defaultdict
from itertools import chain, ifilter, imap
import time
import operator

from pyspark.serializers import NoOpSerializer,\
Expand Down Expand Up @@ -246,8 +245,6 @@ def takeAndPrint(rdd, time):
taken = rdd.take(11)
print "-------------------------------------------"
print "Time: %s" % (str(time))
print rdd.glom().collect()
print "-------------------------------------------"
print "-------------------------------------------"
for record in taken[:10]:
print record
Expand Down Expand Up @@ -447,6 +444,7 @@ def pipeline_func(split, iterator):
self._prev_jdstream = prev._prev_jdstream # maintain the pipeline
self._prev_jrdd_deserializer = prev._prev_jrdd_deserializer
self.is_cached = False
self.is_checkpointed = False
self._ssc = prev._ssc
self.ctx = prev.ctx
self.prev = prev
Expand Down Expand Up @@ -483,4 +481,4 @@ def _jdstream(self):
return self._jdstream_val

def _is_pipelinable(self):
return not self.is_cached
return not (self.is_cached or self.is_checkpointed)

0 comments on commit 2a06cdb

Please sign in to comment.