[jira] [Commented] (SPARK-5343) ShortestPaths traverses backwards

2015-02-09 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14312651#comment-14312651
 ] 

Apache Spark commented on SPARK-5343:
-

User 'brennonyork' has created a pull request for this issue:
https://github.com/apache/spark/pull/4478

 ShortestPaths traverses backwards
 -

 Key: SPARK-5343
 URL: https://issues.apache.org/jira/browse/SPARK-5343
 Project: Spark
  Issue Type: Bug
  Components: GraphX
Affects Versions: 1.2.0
Reporter: Michael Malak

 GraphX ShortestPaths seems to be following edges backwards instead of 
 forwards:
 import org.apache.spark.graphx._
 val g = Graph(sc.makeRDD(Array((1L,), (2L,), (3L,))), 
 sc.makeRDD(Array(Edge(1L,2L,), Edge(2L,3L,
 lib.ShortestPaths.run(g,Array(3)).vertices.collect
 res1: Array[(org.apache.spark.graphx.VertexId, 
 org.apache.spark.graphx.lib.ShortestPaths.SPMap)] = Array((1,Map()), (3,Map(3 
 - 0)), (2,Map()))
 lib.ShortestPaths.run(g,Array(1)).vertices.collect
 res2: Array[(org.apache.spark.graphx.VertexId, 
 org.apache.spark.graphx.lib.ShortestPaths.SPMap)] = Array((1,Map(1 - 0)), 
 (3,Map(1 - 2)), (2,Map(1 - 1)))
 The following changes may be what will make it run forward:
 Change one occurrence of src to dst in
 https://github.com/apache/spark/blob/master/graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala#L64
 Change three occurrences of dst to src in
 https://github.com/apache/spark/blob/master/graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala#L65



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-5343) ShortestPaths traverses backwards

2015-02-09 Thread Brennon York (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-5343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14312591#comment-14312591
 ] 

Brennon York commented on SPARK-5343:
-

I'll take this issue, thanks.

 ShortestPaths traverses backwards
 -

 Key: SPARK-5343
 URL: https://issues.apache.org/jira/browse/SPARK-5343
 Project: Spark
  Issue Type: Bug
  Components: GraphX
Affects Versions: 1.2.0
Reporter: Michael Malak

 GraphX ShortestPaths seems to be following edges backwards instead of 
 forwards:
 import org.apache.spark.graphx._
 val g = Graph(sc.makeRDD(Array((1L,), (2L,), (3L,))), 
 sc.makeRDD(Array(Edge(1L,2L,), Edge(2L,3L,
 lib.ShortestPaths.run(g,Array(3)).vertices.collect
 res1: Array[(org.apache.spark.graphx.VertexId, 
 org.apache.spark.graphx.lib.ShortestPaths.SPMap)] = Array((1,Map()), (3,Map(3 
 - 0)), (2,Map()))
 lib.ShortestPaths.run(g,Array(1)).vertices.collect
 res2: Array[(org.apache.spark.graphx.VertexId, 
 org.apache.spark.graphx.lib.ShortestPaths.SPMap)] = Array((1,Map(1 - 0)), 
 (3,Map(1 - 2)), (2,Map(1 - 1)))
 The following changes may be what will make it run forward:
 Change one occurrence of src to dst in
 https://github.com/apache/spark/blob/master/graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala#L64
 Change three occurrences of dst to src in
 https://github.com/apache/spark/blob/master/graphx/src/main/scala/org/apache/spark/graphx/lib/ShortestPaths.scala#L65



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org