Unsubscribe

2020-01-14 Thread Dylan Hogg
Unsubscribe

Re: Analyzing consecutive elements

2015-10-22 Thread Dylan Hogg
Hi Sampo, You could try zipWithIndex followed by a self join with shifted index values like this: val arr = Array((1, "A"), (8, "D"), (7, "C"), (3, "B"), (9, "E")) val rdd = sc.parallelize(arr) val sorted = rdd.sortByKey(true) val zipped = sorted.zipWithIndex.map(x => (x._2, x._1)) val pairs =