spark中groupByKey與reducByKey的區別

讓我們來看兩個wordcount的例子,一個使用了reduceByKey,而另一個使用groupByKey: 1 2 3 4 5 6 7 8 9 10 11 val words = Array("one", "two", "two", "three", "three", "three") val wordPairsRDD = sc.parallelize(words).map(word => (w
相關文章
相關標籤/搜索