I am working on the below piece of code. var lst = scala.collection.mutable.MutableList[VertexId]() graph.edges.groupBy[VertexId](f).foreach { edgesBySrc => { lst ++= func(edgesBySrc) } }
println(lst.length) Here, the final println() always says that the length of the list is 0. The list is non-empty (correctly prints the length of the returned list inside func()). I am not sure if I am doing the append correctly. Can someone point out what I am doing wrong? -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Not-able-to-update-collections-tp21790.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org