daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 47 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top