Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use global variable instead of emptying then extending list
  • Loading branch information
ontarionick committed Oct 27, 2015
commit 85e4b2551e136c829a39ae6b06c82d72c2984765
4 changes: 2 additions & 2 deletions docs/streaming-kafka-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ Next, we discuss how to use this approach in your streaming application.
offsetRanges = []

def storeOffsetRanges(rdd):
del offsetRanges[:]
offsetRanges.extend(rdd.offsetRanges())
global offsetRanges
offsetRanges = rdd.offsetRanges()
return rdd

def printOffsetRanges(rdd):
Expand Down