I tried adding .copy() everywhere, but still only get one element returned, not even an RDD object.
orig_graph.edges.map(_.copy()).flatMap(edge => Seq(edge) ).map(edge => (Edge(edge.copy().srcId, edge.copy().dstId, edge.copy().attr), 1)).reduce( (A,B) => { if (A._1.copy().dstId == B._1.copy().srcId) (Edge(A._1.copy().srcId, B._1.copy().dstId, 2), 1) else if (A._1.copy().srcId == B._1.copy().dstId) (Edge(B._1.copy().srcId, A._1.copy().dstId, 2), 1) else (Edge(0, 0, 3), 1) } ) = (Edge(0,0,3),1) I'll try getting a fresh copy of the Spark 1.0 code and see if I can get it to work. Thanks for your help!! -- View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/BUG-graph-triplets-does-not-return-proper-values-tp6693p6697.html Sent from the Apache Spark Developers List mailing list archive at Nabble.com.