You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2018/01/10 02:18:00 UTC

[jira] [Resolved] (SPARK-23005) Improve RDD.take on small number of partitions

     [ https://issues.apache.org/jira/browse/SPARK-23005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-23005.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

Issue resolved by pull request 20200
[https://github.com/apache/spark/pull/20200]

> Improve RDD.take on small number of partitions
> ----------------------------------------------
>
>                 Key: SPARK-23005
>                 URL: https://issues.apache.org/jira/browse/SPARK-23005
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 2.2.1
>            Reporter: Gengliang Wang
>            Assignee: Gengliang Wang
>             Fix For: 2.3.0
>
>
> In current implementation of RDD.take, we overestimate the number of partitions we need to try by 50%:
> `(1.5 * num * partsScanned / buf.size).toInt`
> However, when the number is small, the result of `.toInt` is not what we want. 
> E.g, 2.9 will become 2, which should be 3.
> Use math.Ceil fix the problem.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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