aboutsummaryrefslogtreecommitdiff
path: root/graphx
diff options
context:
space:
mode:
authorlianhuiwang <lianhuiwang09@gmail.com>2014-11-06 10:46:45 -0800
committerAnkur Dave <ankurdave@gmail.com>2014-11-06 10:46:45 -0800
commitd15c6e9dc2860bbe56e31ddf71218ccc6d5c841d (patch)
treeceaa8ded69864fafa1e391cd80034ed05cfb528e /graphx
parent23eaf0e12ff221dcca40a79e61b6cc5e7c846cb5 (diff)
downloadspark-d15c6e9dc2860bbe56e31ddf71218ccc6d5c841d.tar.gz
spark-d15c6e9dc2860bbe56e31ddf71218ccc6d5c841d.tar.bz2
spark-d15c6e9dc2860bbe56e31ddf71218ccc6d5c841d.zip
[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
Diffstat (limited to 'graphx')
-rw-r--r--graphx/src/main/scala/org/apache/spark/graphx/impl/EdgePartitionBuilder.scala4
1 files changed, 2 insertions, 2 deletions
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 4520beb991..2b6137be25 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