Skip to content

Commit

Permalink
comment formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
svenkreiss committed May 7, 2017
1 parent 8fbc69c commit 9e970a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pysparkling/streaming/dstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ def union(self, other):
Example:
>>> import pysparkling
>>> sc = pysparkling.Context()
>>> ssc = pysparkling.streaming.StreamingContext(sc, 0.1)
Expand All @@ -547,6 +548,7 @@ def updateStateByKey(self, func):
:param func: Evaluated per key. Takes list of input_values and a state.
:rtype: DStream
This example shows how to return the latest value per key:
>>> import pysparkling
Expand All @@ -566,6 +568,7 @@ def updateStateByKey(self, func):
[('a', 1), ('b', 3)]
[('a', 2), ('b', 3), ('c', 4)]
This example counts values per key:
>>> sc = pysparkling.Context()
Expand All @@ -592,6 +595,9 @@ def window(self, windowDuration, slideDuration=None):
:param float slideDuration: multiple of batching interval
:rtype: DStream
Example:
>>> import pysparkling
>>> sc = pysparkling.Context()
>>> ssc = pysparkling.streaming.StreamingContext(sc, 0.2)
Expand Down

0 comments on commit 9e970a4

Please sign in to comment.