Ingesting from Hive to ElasticSearch

Thanks James for your reply. I disabled wan only mode. And I changed below code as well:

val conf = new SparkConf().setAppName("FASApplication").setMaster("local");

to

val conf = new SparkConf().setAppName("FASApplication");

However the problem was with the spark-submit command. I did not have --master yarn --deploy-mode cluster. After adding this options my job was shared by 3 cluster nodes.