You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by rohit13k <ro...@gmail.com> on 2015/10/14 11:13:57 UTC
EdgeTriplet showing two versions of the same vertex
Hi
I have a scenario where in the graph I am doing graph.vertices.collect() and
getting the 5 vertex i added each of my vertex is an scala object as shown
below
class NodeExact(nodeId: Long, summ: Array[collection.mutable.Map[Long,
Long]]) extends Serializable {
var node: Long = nodeId
var currentsuperstep = 0
var summary: Array[collection.mutable.Map[Long, Long]] = summ
var ischanged = false
def getsummary(window: Long): Int = {
var i = 0
var sum = summary.clone()
sum=sum.filter({ p => p != null })
sum.foreach(f => f.filter { case (value, time) => time > window })
var temp: scala.collection.Set[Long] = null
for (i <- 0 to sum.length - 1) {
if (temp == null)
temp = sum(i).keySet
else
temp ++ sum(i).keySet
}
return temp.size
}
}
there are multiple edges between nodes in the graph i.e both a -> b and b->a
now when i do
graph.triplets.collect()
I am getting edgetriplets with source id as *a* but the src attr of* a* is
not same as the value of *a* in the vertexRDD for some edge triplets where
as for some edge triplets its same as vertexRDD.
I am not able to understand how come src Attr for the same vertex for two
edgetripplets can have different values? It should always have the same attr
as in vertexRDD?
Please let me know if I am missing something.
Thanks
--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/EdgeTriplet-showing-two-versions-of-the-same-vertex-tp25058.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