Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
giwa committed Sep 20, 2014
1 parent 1934726 commit 019ef38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/src/main/python/streaming/test_oprations.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

lines = ssc.socketTextStream(sys.argv[1], int(sys.argv[2]))
words = lines.flatMap(lambda line: line.split(" "))
# ssc.checkpoint("checkpoint")
mapped_words = words.map(lambda word: (word, 1))
count = mapped_words.reduceByKey(add)

count.pyprint()
ssc.start()
# ssc.awaitTermination()
ssc.stop()
ssc.awaitTermination()
# ssc.stop()
1 change: 1 addition & 0 deletions python/pyspark/streaming/dstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def saveAsTextFile(rdd, time):
# TODO: implemtnt rightOuterJoin



class PipelinedDStream(DStream):
def __init__(self, prev, func, preservesPartitioning=False):
if not isinstance(prev, PipelinedDStream) or not prev._is_pipelinable():
Expand Down

0 comments on commit 019ef38

Please sign in to comment.