More specifically, you could have TBs of data across thousands of partitions for a single RDD. If you call collect(), BOOM!
Dean Wampler, Ph.D. Author: Programming Scala, 2nd Edition <http://shop.oreilly.com/product/0636920033073.do> (O'Reilly) Typesafe <http://typesafe.com> @deanwampler <http://twitter.com/deanwampler> http://polyglotprogramming.com On Tue, Dec 22, 2015 at 4:20 PM, Silvio Fiorito < [email protected]> wrote: > Michael, > > collect will bring down the results to the driver JVM, whereas the RDD or > DataFrame would be cached on the executors (if it is cached). So, as Dean > said, the driver JVM needs to have enough memory to store the results of > collect. > > Thanks, > Silvio > > From: Michael Segel <[email protected]> > Date: Tuesday, December 22, 2015 at 4:26 PM > To: Dean Wampler <[email protected]> > Cc: Gaurav Agarwal <[email protected]>, "[email protected]" < > [email protected]> > Subject: Re: Spark data frame > > Dean, > > RDD in memory and then the collect() resulting in a collection, where both > are alive at the same time. > (Again not sure how Tungsten plays in to this… ) > > So his collection can’t be larger than 1/2 of the memory allocated to the > heap. > > (Unless you have allocated swap…, right?) > > On Dec 22, 2015, at 12:11 PM, Dean Wampler <[email protected]> wrote: > > You can call the collect() method to return a collection, but be careful. > If your data is too big to fit in the driver's memory, it will crash. > > Dean Wampler, Ph.D. > Author: Programming Scala, 2nd Edition > <http://shop.oreilly.com/product/0636920033073.do> (O'Reilly) > Typesafe <http://typesafe.com/> > @deanwampler <http://twitter.com/deanwampler> > http://polyglotprogramming.com > > On Tue, Dec 22, 2015 at 1:09 PM, Gaurav Agarwal <[email protected]> > wrote: > >> We are able to retrieve data frame by filtering the rdd object . I need >> to convert that data frame into java pojo. Any idea how to do that >> > > >
