daily pastebin goal
7%
SHARE
TWEET

Untitled

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