How to decide number of executors and core in spark
There are 2 parts provided by cloudera, please follow cloudera links
https://blog.cloudera.com/how-to-tune-your-apache-spark-jobs-part-1/
https://blog.cloudera.com/how-to-tune-your-apache-spark-jobs-part-2/