Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
spark:spark-introduction [2014/11/11 09:13] straka |
spark:spark-introduction [2015/07/27 17:51] straka |
||
---|---|---|---|
Line 51: | Line 51: | ||
val counts = words.map(word => (word, | val counts = words.map(word => (word, | ||
val sorted = counts.sortBy({case (word, count) => count}, ascending=false) | val sorted = counts.sortBy({case (word, count) => count}, ascending=false) | ||
- | sorted.saveAsTextFile('output') | + | sorted.saveAsTextFile("output") |
// Alternatively without variables and using placeholders in lambda parameters: | // Alternatively without variables and using placeholders in lambda parameters: |