spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-8893) Require positive partition counts in RDD.repartition
Date Wed, 08 Jul 2015 16:11:04 GMT

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

Sean Owen updated SPARK-8893:
-----------------------------
    Component/s: Spark Core

> Require positive partition counts in RDD.repartition
> ----------------------------------------------------
>
>                 Key: SPARK-8893
>                 URL: https://issues.apache.org/jira/browse/SPARK-8893
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 1.4.0
>            Reporter: Daniel Darabos
>            Priority: Trivial
>
> What does {{sc.parallelize(1 to 3).repartition(p).collect}} return? I would expect {{Array(1,
2, 3)}} regardless of {{p}}. But if {{p}} < 1, it returns {{Array()}}. I think instead
it should throw an {{IllegalArgumentException}}.
> I think the case is pretty clear for {{p}} < 0. But the behavior for {{p}} = 0 is
also error prone. In fact that's how I found this strange behavior. I used {{rdd.repartition(a/b)}}
with positive {{a}} and {{b}}, but {{a/b}} was rounded down to zero and the results surprised
me. I'd prefer an exception instead of unexpected (corrupt) results.
> I'm happy to send a pull request for this.



--
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


Mime
View raw message