What's the rationale behind that? It certainly limits the kind of flow logic we can do in one statement.
Sent from my Verizon Wireless 4G LTE smartphone -------- Original message -------- From: David Russell <themarchoffo...@protonmail.com> Date: 01/18/2016 10:44 PM (GMT-05:00) To: charles li <charles.up...@gmail.com> Cc: user@spark.apache.org Subject: Re: rdd.foreach return value The foreach operation on RDD has a void (Unit) return type. See attached. So there is no return value to the driver. David "All that is gold does not glitter, Not all those who wander are lost." -------- Original Message -------- Subject: rdd.foreach return value Local Time: January 18 2016 10:34 pm UTC Time: January 19 2016 3:34 am From: charles.up...@gmail.com To: user@spark.apache.org code snippet the 'print' actually print info on the worker node, but I feel confused where the 'return' value goes to. for I get nothing on the driver node. -- -------------------------------------- a spark lover, a quant, a developer and a good man. http://github.com/litaotao