Great, I will use mapPartitions instead.
Thanks for the advice,
Yadid
On 11/17/13 8:13 PM, Aaron Davidson wrote:
Also, in general, you can workaround shortcomings in the Java API by
converting to a Scala RDD (using JavaRDD's rdd() method). The API
tends to be much clunkier since you have to
Hi,
According to the API, foreachPartition() is not yet implemented in Java.
Are there any workarounds to get the same functionality ?
I have a non serializable DB connection and instantiating it is pretty
expensive, so I prefer to do it on a per partition basis.
thanks,
Yadid
Also, in general, you can workaround shortcomings in the Java API by
converting to a Scala RDD (using JavaRDD's rdd() method). The API tends to
be much clunkier since you have to jump through some hoops to talk to a
Scala API in Java, though. In this case, JavaRDD's mapPartition() method
will