[
https://issues.apache.org/jira/browse/SPARK-8292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14717115#comment-14717115
]
Anita Tailor commented on SPARK-8292:
-------------------------------------
No an issue, It's directed graph and there is no incoming edge for node 0.
If we add one incoming edge "5\t0" to test data mentioned above, it will give
following results, which looks correct
(4,Map(0 -> 2))
(0,Map(0 -> 0))
(6,Map())
(2,Map())
(3,Map())
(5,Map(0 -> 1))
> ShortestPaths run with error result
> -----------------------------------
>
> Key: SPARK-8292
> URL: https://issues.apache.org/jira/browse/SPARK-8292
> Project: Spark
> Issue Type: Bug
> Components: GraphX
> Affects Versions: 1.3.1
> Environment: Ubuntu 64bit
> Reporter: Bruce Chen
> Priority: Minor
> Labels: patch
> Attachments: ShortestPaths.patch
>
>
> In graphx/lib/ShortestPaths, i run an example with input data:
> 0\t2
> 0\t4
> 2\t3
> 3\t6
> 4\t2
> 4\t5
> 5\t3
> 5\t6
> then i write a function and set point '0' as the source point, and calculate
> the shortest path from point 0 to the others points, the code like this:
> val source: Seq[VertexId] = Seq(0)
> val ss = ShortestPaths.run(graph, source)
> then, i get the run result of all the vertex's shortest path value:
> (4,Map())
> (0,Map(0 -> 0))
> (6,Map())
> (3,Map())
> (5,Map())
> (2,Map())
> but the right result should be:
> (4,Map(0 -> 1))
> (0,Map(0 -> 0))
> (6,Map(0 -> 3))
> (3,Map(0 -> 2))
> (5,Map(0 -> 2))
> (2,Map(0 -> 1))
> so, i check the source code of
> spark/graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala
> and find a bug.
> The patch list in the following.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]