spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bertlhf <b...@analytag.com>
Subject GraphX - Correct path traversal order from an Array[Edge[ED]]
Date Tue, 17 Mar 2015 11:31:33 GMT
Below is a listing from a filtered Array[Edge[ED]]:

scala> altGraph.edges.filter {case (edge) =>
edge.attr.contains("wien-krak-s103") }.collect.foreach { case (edge) =>
println(s"SrcId = ${edge.srcId}, DstId = ${edge.dstId}")}
SrcId = 1, DstId = 2                                                                     
                                      
SrcId = 2, DstId = 3
...
SrcId = 8, DstId = 9
SrcId = 9, DstId = 10
SrcId = 100001, DstId = 1
SrcId = 10, DstId = 11
SrcId = 11, DstId = 12
...
SrcId = 14, DstId = 15
SrcId = 15, DstId = 16
SrcId = 16, DstId = 98
SrcId = 98, DstId = 99
...

How can I get a listing in the correct path traversal order (see below)?

SrcId = 100001, DstId = 1
SrcId = 1, DstId = 2                                                                     
                                      
SrcId = 2, DstId = 3
...
SrcId = 8, DstId = 9
SrcId = 9, DstId = 10
SrcId = 10, DstId = 11
SrcId = 11, DstId = 12
...
SrcId = 14, DstId = 15
SrcId = 15, DstId = 16
SrcId = 16, DstId = 98
SrcId = 98, DstId = 99
...



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/GraphX-Correct-path-traversal-order-from-an-Array-Edge-ED-tp22100.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message