Skip to content

Instantly share code, notes, and snippets.

@marcovivero
Created July 14, 2015 23:21
Show Gist options
  • Save marcovivero/821115f960c4658bd076 to your computer and use it in GitHub Desktop.
Save marcovivero/821115f960c4658bd076 to your computer and use it in GitHub Desktop.
val rowSums: HashMap[Int, Double] = HashMap(
input.map(e => (e._1, e._3))
.reduceByKey(_ + _)
.collect : _*
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment