Commit 5a5c52a
committed
SPARK-1329: Create pid2vid with correct number of partitions
Each vertex partition is co-located with a pid2vid array created in
RoutingTable.scala. This array maps edge partition IDs to the list of
vertices in the current vertex partition that are mentioned by edges in
that partition. Therefore the pid2vid array should have one entry per
edge partition.
GraphX currently creates one entry per vertex partition, which is a bug
that leads to an ArrayIndexOutOfBoundsException when there are more edge
partitions than vertex partitions. This commit fixes the bug and adds a
test for this case.
Resolves SPARK-1329. Thanks to Daniel Darabos for reporting this bug.1 parent b9e0c93 commit 5a5c52a
File tree
2 files changed
+14
-2
lines changed- graphx/src
- main/scala/org/apache/spark/graphx/impl
- test/scala/org/apache/spark/graphx
2 files changed
+14
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
290 | 302 | | |
0 commit comments