Hi, I have this file reading function is called /foo/ which reads contents into a list of lists or into a generator of list of lists representing the same file.
When reading as a complete chunk(1 record array) I do something like: rdd = file_paths_rdd.map(lambda x: foo(x,"wholeFile")).flatMap(lambda x:x) I'd like to now do something similar but with the generator, so that I can work with more cores and a lower memory. I'm not sure how to tackle this since generators cannot be pickled and thus I'm not sure how to ditribute the work of reading each file_path on the rdd? -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/PySpark-working-with-Generators-tp28810.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org