The following code produces no output. It seems as if the print(x) is not being executed for each "words" element:
words = sc.parallelize (
["scala",
"java",
"hadoop",
"spark",
"akka",
"spark vs hadoop",
"pyspark",
"pyspark and spark"]
)
def f(x): print(x)
fore = words.foreach(f)
Any idea?
Thanks in advance