Re: "collecting" DStream data

2016-05-15 Thread Daniel Haviv
I mistyped, the code is foreachRDD(r=> arr++=r.collect) And it does work for ArrayBuffer but not for HashMap On Sun, May 15, 2016 at 3:04 PM, Silvio Fiorito < silvio.fior...@granturing.com> wrote: > Hi Daniel, > > Given your example, “arr” is defined on the driver, but the “foreachRDD” > functio

Re: "collecting" DStream data

2016-05-15 Thread Silvio Fiorito
Hi Daniel, Given your example, “arr” is defined on the driver, but the “foreachRDD” function is run on the executors. If you want to collect the results of the RDD/DStream down to the driver you need to call RDD.collect. You have to be careful though that you have enough memory on the driver JV