Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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*
repartition(0)
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()
*After*
repartition(0)
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. ...
Attachments
Issue Links
- is duplicated by
-
SPARK-16797 Repartiton call w/ 0 partitions drops data
- Closed
- relates to
-
SPARK-8893 Require positive partition counts in RDD.repartition
- Resolved
- links to