Skip to content

Commit

Permalink
[SPARK-4249][GraphX]fix a problem of EdgePartitionBuilder in Graphx
Browse files Browse the repository at this point in the history
at first srcIds is not initialized and are all 0. so we use edgeArray(0).srcId to currSrcId

Author: lianhuiwang <lianhuiwang09@gmail.com>

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

3f4e503 [lianhuiwang] fix a problem of EdgePartitionBuilder in Graphx
  • Loading branch information
lianhuiwang authored and ankurdave committed Nov 6, 2014
1 parent 23eaf0e commit d15c6e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d15c6e9

Please sign in to comment.