Skip to content

Commit d15c6e9

Browse files
lianhuiwangankurdave
authored andcommitted
[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 <lianhuiwang09@gmail.com> Closes #3138 from lianhuiwang/SPARK-4249 and squashes the following commits: 3f4e503 [lianhuiwang] fix a problem of EdgePartitionBuilder in Graphx
1 parent 23eaf0e commit d15c6e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class EdgePartitionBuilder[@specialized(Long, Int, Double) ED: ClassTag, VD: Cla
4545
// Copy edges into columnar structures, tracking the beginnings of source vertex id clusters and
4646
// adding them to the index
4747
if (edgeArray.length > 0) {
48-
index.update(srcIds(0), 0)
49-
var currSrcId: VertexId = srcIds(0)
48+
index.update(edgeArray(0).srcId, 0)
49+
var currSrcId: VertexId = edgeArray(0).srcId
5050
var i = 0
5151
while (i < edgeArray.size) {
5252
srcIds(i) = edgeArray(i).srcId

0 commit comments

Comments
 (0)