What is the best way to do an inverse sort in scala? I imagine the following is somewhat slow.
list.sortBy(_.size).reverse
Is there a conv
this is my code ;)
val wordCounts = logData.flatMap(line => line.split(" ")) .map(word => (word, 1)) .reduceByKey((a, b) => a + b) wordCounts.sortBy(- _._2).collect()