You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2015/12/02 10:44:11 UTC

[jira] [Resolved] (SPARK-3580) Add Consistent Method To Get Number of RDD Partitions Across Different Languages

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

Sean Owen resolved SPARK-3580.
------------------------------
       Resolution: Fixed
         Assignee: Jeroen Schot
    Fix Version/s: 1.6.0

Resolved by https://github.com/apache/spark/pull/9767

> Add Consistent Method To Get Number of RDD Partitions Across Different Languages
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-3580
>                 URL: https://issues.apache.org/jira/browse/SPARK-3580
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark, Spark Core
>    Affects Versions: 1.1.0
>            Reporter: Pat McDonough
>            Assignee: Jeroen Schot
>              Labels: starter
>             Fix For: 1.6.0
>
>
> Programmatically retrieving the number of partitions is not consistent between python and scala. A consistent method should be defined and made public across both languages.
> RDD.partitions.size is also used quite frequently throughout the internal code, so that might be worth refactoring as well once the new method is available.
> What we have today is below.
> In Scala:
> {code}
> scala> someRDD.partitions.size
> res0: Int = 30
> {code}
> In Python:
> {code}
> In [2]: someRDD.getNumPartitions()
> Out[2]: 30
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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