a guest Dec 7th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- rddQueue = ssc.queueStream([rdd1, rdd2])
- def func(new_values, old_value):
- return sum(new_values) + (old_value or 0)
- rddQueue = rddQueue.updateStateByKey(func).transform(lambda x: x.sortBy(lambda y: y, ascending=False))
RAW Paste Data