Thanks Jacob much appreciated
Mich On 11/02/2016 00:01, Jakob Odersky wrote: > Exactly! > As a final note, `foreach` is also defined on RDDs. This means that > you don't need to `collect()` the results into an array (which could > give you an OutOfMemoryError in case the RDD is really really large) > before printing them. > > Personally, when I learn using a new library, I like to look at its > Scaladoc > (http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.rdd.RDD > [1] > for Spark) and test it in the REPL/worksheets (for Spark you already > have `spark-shell`) > > best, > --Jakob Links: ------ [1] http://spark.apache.org/docs/latest/api/scala/index.html#org.apache.spark.rdd.RDD