domibd wrote > find(v, collection) : boolean > beign > item = collection.first // assuming collection has at least > one item > > while (item != v and collection has next item) > item = collection.nextItem > > return item == v > end
I'm not an expert, so take my advice with a grain of salt. Anyway, one idea you can try is to write a search function that works on the values in one partition -- that part is sequential and not parallel. Then call mapPartitions to map that function over all partitions in an RDD. Presumably you will need to reduce the output of mapPartition (which, I guess, will be a collection of Boolean values) by taking the logical disjunction (i.e., a or b) of the output. Hope this helps you figure out a solution. Robert Dodier -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/translate-algorithm-in-spark-tp25844p25867.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