Repository: spark
Updated Branches:
  refs/heads/branch-1.2 aaaeaf939 -> 9061bc4e1


[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 <lianhuiwan...@gmail.com>

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 <ankurd...@gmail.com>


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

Branch: refs/heads/branch-1.2
Commit: 9061bc4e127abb0c44e37f1b8b7706883d451bc7
Parents: aaaeaf9
Author: lianhuiwang <lianhuiwan...@gmail.com>
Authored: Thu Nov 6 10:46:45 2014 -0800
Committer: Ankur Dave <ankurd...@gmail.com>
Committed: Thu Nov 6 10:47:49 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/9061bc4e/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: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to