Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- scala> val numbers = sc.parallelize(10 to 50 by 10)
- numbers: org.apache.spark.rdd.RDD[Int] = ParallelCollectionRDD[9] at parallelize at <console>:24
- scala> numbers.collect().foreach(println)
- 10
- 20
- 30
- 40
- 50
- scala> numbers.foreach(x => println(x))
- scala>
- Spark version 2.0.0.cloudera2
- Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement