Skip to content

Instantly share code, notes, and snippets.

@paulcarey
Created March 22, 2017 01:35
Show Gist options
  • Save paulcarey/34405dd65e98a94238d480964f7ada26 to your computer and use it in GitHub Desktop.
Save paulcarey/34405dd65e98a94238d480964f7ada26 to your computer and use it in GitHub Desktop.
var counter = 0
var rdd = sc.parallelize(data)
rdd.foreach(x => counter += x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment