In Apache Spark program how do we know which part of code will execute in driver program and which part of code will execute in worker nodes?
With Regards
All the closures passed as argument to method of JavaRDD/JavaPairRDD/similar and some method of these classes will be executed by spark nodes. Everything else is driver code.