[ 
https://issues.apache.org/jira/browse/SPARK-27025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16783110#comment-16783110
 ] 

Erik van Oosten commented on SPARK-27025:
-----------------------------------------

Thanks Sean, that is very useful.

In my use case the entire data set is too big for the driver, but I can easily 
fit 1/10th of it. So even with as little as 20 partitions, 2 partitions on the 
driver would be fine.
In the use case there are 2 joins, and a groupby/count so this is probably a 
wide transformation. So it seems that the cache/count/toLocalIterator/unpersist 
approach is applicable.

The ergonomics of this approach are way worse, so I don't agree that it is 
'better' to do this in application code.

> Speed up toLocalIterator
> ------------------------
>
>                 Key: SPARK-27025
>                 URL: https://issues.apache.org/jira/browse/SPARK-27025
>             Project: Spark
>          Issue Type: Wish
>          Components: Spark Core
>    Affects Versions: 2.3.3
>            Reporter: Erik van Oosten
>            Priority: Major
>
> Method {{toLocalIterator}} fetches the partitions to the driver one by one. 
> However, as far as I can see, any required computation for the 
> yet-to-be-fetched-partitions is not kicked off until it is fetched. 
> Effectively only one partition is being computed at the same time. 
> Desired behavior: immediately start calculation of all partitions while 
> retaining the download-a-partition at a time behavior.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to