println occurs on the machine where the task executes, which may or
may not be the same as your local driver process. collect()-ing brings
data back to the driver, so printing there definitely occurs on the
driver.
On Tue, Feb 24, 2015 at 9:48 AM, patcharee patcharee.thong...@uni.no wrote:
Hi,
Hi,
I would like to print the content of RDD[String]. I tried
1) linesWithSpark.foreach(println)
2) linesWithSpark.collect().foreach(println)
I submitted the job by spark-submit. 1) did not print, but 2) did.
But when I used the shell, both 1) and 2) printed.
Any ideas why 1) behaves