spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-15512) repartition(0) should raise IllegalArgumentException.
Date Tue, 24 May 2016 21:53:12 GMT

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

Apache Spark reassigned SPARK-15512:
------------------------------------

    Assignee:     (was: Apache Spark)

> repartition(0) should raise IllegalArgumentException.
> -----------------------------------------------------
>
>                 Key: SPARK-15512
>                 URL: https://issues.apache.org/jira/browse/SPARK-15512
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Dongjoon Hyun
>
> Previously, SPARK-8893 added the positive partition constrains on repartition/coalesce
operations in general.
> This PR adds one missing part for that and adds explicit two testcases.
> **Before**
> {code:title=repartition(0)|borderStyle=solid}
> scala> sc.parallelize(1 to 5).coalesce(0).collect()
> java.lang.IllegalArgumentException: requirement failed: Number of partitions (0) must
be positive.
> ...
> scala> sc.parallelize(1 to 5).repartition(0).collect()
> res1: Array[Int] = Array()
> {code}
> **After**
> {code:title=repartition(0)|borderStyle=solid}
> scala> sc.parallelize(1 to 5).coalesce(0).collect()
> java.lang.IllegalArgumentException: requirement failed: Number of partitions (0) must
be positive.
> ...
> scala> sc.parallelize(1 to 5).repartition(0).collect()
> java.lang.IllegalArgumentException: requirement failed: Number of partitions (0) must
be positive.
> ...
> {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


Mime
View raw message