spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Mansour <>
Subject Re: [EXT] [Spark 2.x Core] .collect() size limit
Date Mon, 30 Apr 2018 23:09:09 GMT
Well, if you don't need to actually evaluate the information on the driver, but just need to
trigger some sort of action, then you may want to consider using the `forEach` or `forEachPartition`
method, which is an action and will execute your process.  It won't return anything to the
driver and blow out its memory.  For instance, I coalesce results to a smaller number of partitions,
and use the forEachPartition to have the pipeline executed and results written via a custom
DB connector. 

If you need to save the results of your job, then just write them to disk or a DB. 

Please expand on what you're trying to achieve here. 

Michael Mansour
Data Scientist 
Symantec CASB

´╗┐On 4/28/18, 8:41 AM, "klrmowse" <> wrote:

    i am currently trying to find a workaround for the Spark application i am
    working on so that it does not have to use .collect()
    but, for now, it is going to have to use .collect()
    what is the size limit (memory for the driver) of RDD file that .collect()
    can work with?
    i've been scouring google-search - S.O., blogs, etc, and everyone is
    cautioning about .collect(), but does not specify how huge is huge... are we
    talking about a few gigabytes? terabytes?? petabytes???
    thank you
    Sent from:
    To unsubscribe e-mail:

View raw message