O'Reilly logo
  • Suraj Nayak thinks this is interesting:

sc.parallelize(data).reduceByKey((x, y) => x + y) // Custom parallelism

From

Cover of Learning Spark

Note

Should this be sc.parallelize(data).reduceByKey((x, y) => x + y,10) ?