GitHub user maropu opened a pull request:

    https://github.com/apache/spark/pull/4136

    [SPARK-5351][GraphX] Do not use Partitioner.defaultPartitioner as a 
partitioner of EdgeRDDImp...

    If the value of 'spark.default.parallelism' does not match the number of 
partitoins in EdgePartition(EdgeRDDImpl), 
    the following error occurs in ReplicatedVertexView.scala:72;
    
    object GraphTest extends Logging {
      def run[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]): VertexRDD[Int] 
= {
        graph.aggregateMessages[Int](
          ctx => {
            ctx.sendToSrc(1)
            ctx.sendToDst(2)
          },
          _ + _)
      }
    }
    
    val g = GraphLoader.edgeListFile(sc, "graph.txt")
    val rdd = GraphTest.run(g)
    
    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:206)
        at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204)
        at scala.Option.getOrElse(Option.scala:120)
        at org.apache.spark.rdd.RDD.partitions(RDD.scala:204)
        at 
org.apache.spark.rdd.MapPartitionsRDD.getPartitions(MapPartitionsRDD.scala:32)
        at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:206)
        at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:204)
        at scala.Option.getOrElse(Option.scala:120)
        at org.apache.spark.rdd.RDD.partitions(RDD.scala:204)
        at org.apache.spark.ShuffleDependency.<init>(Dependency.scala:82)
        at 
org.apache.spark.rdd.ShuffledRDD.getDependencies(ShuffledRDD.scala:80)
        at org.apache.spark.rdd.RDD$$anonfun$dependencies$2.apply(RDD.scala:193)
        at org.apache.spark.rdd.RDD$$anonfun$dependencies$2.apply(RDD.scala:191)
        ...

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/maropu/spark EdgePartitionBugFix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/4136.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4136
    
----
commit 0a2f32b0283b4fe319a23f7f4541d1531ddcbab2
Author: Takeshi Yamamuro <[email protected]>
Date:   2015-01-21T15:59:58Z

    Do not use Partitioner.defaultPartitioner as a partitioner of EdgeRDDImpl

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to