Repository: spark
Updated Branches:
  refs/heads/branch-1.0 49224fd0f -> 76c20cac9


[SPARK-4249][GraphX]fix a problem of EdgePartitionBuilder in Graphx

at first srcIds is not initialized and are all 0. so we use edgeArray(0).srcId 
to currSrcId

Author: lianhuiwang <[email protected]>

Closes #3138 from lianhuiwang/SPARK-4249 and squashes the following commits:

3f4e503 [lianhuiwang] fix a problem of EdgePartitionBuilder in Graphx

(cherry picked from commit d15c6e9dc2860bbe56e31ddf71218ccc6d5c841d)
Signed-off-by: Ankur Dave <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/76c20cac
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/76c20cac
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/76c20cac

Branch: refs/heads/branch-1.0
Commit: 76c20cac99437ac07bcc9d71e295fd49fd465f4e
Parents: 49224fd
Author: lianhuiwang <[email protected]>
Authored: Thu Nov 6 10:46:45 2014 -0800
Committer: Ankur Dave <[email protected]>
Committed: Thu Nov 6 10:49:44 2014 -0800

----------------------------------------------------------------------
 .../org/apache/spark/graphx/impl/EdgePartitionBuilder.scala      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/76c20cac/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala
----------------------------------------------------------------------
diff --git 
a/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala 
b/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala
index 4520beb..2b6137b 100644
--- 
a/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala
+++ 
b/graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala
@@ -45,8 +45,8 @@ class EdgePartitionBuilder[@specialized(Long, Int, Double) 
ED: ClassTag, VD: Cla
     // Copy edges into columnar structures, tracking the beginnings of source 
vertex id clusters and
     // adding them to the index
     if (edgeArray.length > 0) {
-      index.update(srcIds(0), 0)
-      var currSrcId: VertexId = srcIds(0)
+      index.update(edgeArray(0).srcId, 0)
+      var currSrcId: VertexId = edgeArray(0).srcId
       var i = 0
       while (i < edgeArray.size) {
         srcIds(i) = edgeArray(i).srcId


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

Reply via email to