Github user ankurdave commented on a diff in the pull request:

    https://github.com/apache/spark/pull/497#discussion_r12455215
  
    --- Diff: 
graphx/src/main/scala/org/apache/spark/graphx/impl/GraphImpl.scala ---
    @@ -89,105 +81,79 @@ class GraphImpl[VD: ClassTag, ED: ClassTag] protected (
         }
           .partitionBy(new HashPartitioner(numPartitions))
           .mapPartitionsWithIndex( { (pid, iter) =>
    -        val builder = new EdgePartitionBuilder[ED]()(edTag)
    +        val builder = new EdgePartitionBuilder[ED, VD]()(edTag, vdTag)
             iter.foreach { message =>
               val data = message.data
               builder.add(data._1, data._2, data._3)
             }
             val edgePartition = builder.toEdgePartition
             Iterator((pid, edgePartition))
    -      }, preservesPartitioning = true).cache())
    -    GraphImpl(vertices, newEdges)
    +      }, preservesPartitioning = true))
    +    GraphImpl.fromExistingRDDs(vertices, newEdges)
       }
     
       override def reverse: Graph[VD, ED] = {
    -    val newETable = edges.mapEdgePartitions((pid, part) => part.reverse)
    -    GraphImpl(vertices, newETable)
    +    new GraphImpl(vertices.reverseRoutingTables(), 
replicatedVertexView.reverse())
       }
     
       override def mapVertices[VD2: ClassTag](f: (VertexId, VD) => VD2): 
Graph[VD2, ED] = {
    --- End diff --
    
    Introduce private mapVerticesDelta to work around SPARK-1552


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

Reply via email to