Skip to content
Snippets Groups Projects
Commit d15c6e9d authored by lianhuiwang's avatar lianhuiwang Committed by Ankur Dave
Browse files

[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
parent 23eaf0e1
No related branches found
No related tags found
No related merge requests found
...@@ -45,8 +45,8 @@ class EdgePartitionBuilder[@specialized(Long, Int, Double) ED: ClassTag, VD: Cla ...@@ -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 // Copy edges into columnar structures, tracking the beginnings of source vertex id clusters and
// adding them to the index // adding them to the index
if (edgeArray.length > 0) { if (edgeArray.length > 0) {
index.update(srcIds(0), 0) index.update(edgeArray(0).srcId, 0)
var currSrcId: VertexId = srcIds(0) var currSrcId: VertexId = edgeArray(0).srcId
var i = 0 var i = 0
while (i < edgeArray.size) { while (i < edgeArray.size) {
srcIds(i) = edgeArray(i).srcId srcIds(i) = edgeArray(i).srcId
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment