spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Owen (JIRA)" <>
Subject [jira] [Commented] (SPARK-5385) Calling textFile, parallelize, zip, then partitions causes failure on some local[*]
Date Fri, 23 Jan 2015 18:00:43 GMT


Sean Owen commented on SPARK-5385:

The number of partitions is not the problem, although several methods (including coalesce
and repartition) let you change the number of partitions. The issue is that the partitions
do not all have the same number of elements as each other.

> Calling textFile, parallelize, zip, then partitions causes failure on some local[*]
> -----------------------------------------------------------------------------------
>                 Key: SPARK-5385
>                 URL:
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Pedro Rodriguez
> There is a bug in Spark core which produces the exception: "Can't zip RDDs with unequal
numbers of partitions"
> General Steps to reproduce:
> 1. Run sc.textFiles
> 2. Run sc.parallelize
> 3. Zip results of top two
> 4. Call partitions on result of zip
> 5. Run for local, local[2], local[3],...
> 6. My machine (macbook air) fails on local[3].
> Github repository with code example:
> Steps to run: execute "sbt run", wait for failure
> Stack trace:
> java.lang.IllegalArgumentException: Can't zip RDDs with unequal numbers of partitions
> 	at org.apache.spark.rdd.ZippedPartitionsBaseRDD.getPartitions(ZippedPartitionsRDD.scala:57)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:205)
> 	at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:203)
> 	at scala.Option.getOrElse(Option.scala:120)
> 	at org.apache.spark.rdd.RDD.partitions(RDD.scala:203)
> 	at App$.main(App.scala:33)
> 	at App.main(App.scala)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> I am looking into the relevant classes, but insight would be appreciated. This ticket
may also be related to and

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message