Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created May 16, 2017 01:48
Show Gist options
  • Save dgadiraju/e52371ec2ccd2ca9d89a972e1afa08ad to your computer and use it in GitHub Desktop.
Save dgadiraju/e52371ec2ccd2ca9d89a972e1afa08ad to your computer and use it in GitHub Desktop.
val data = 1 to 1000000
val dataRDD = sc.parallelize(data)
dataRDD.reduce((acc, value) => acc + value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment