Spark version: 1.6.2
Spark configuration:
executors: 18
memory per executor: 30g
cores x executor: 2
Kafka configuration:
- partitions: 18
Context:
I have a Spark-streaming pipeline that is using the new Direct approach from Kafka instead of receivers. This pipeline receives data from kafka, transforms the data, and inserts to Hive. We release that the trigger used as action to insert the data has a locality level equal to RACK_LOCAL, instead of PROCESS_LOCAL or NODE_LOCAL. Moreover, the input size column shows network information instead of memory. I have set the config variable spark.locality.wait=30s to test if spark waits enough to select the best locality mode, but none improvements has been shown.
Considering that the kafka partitions = num partitions in spark are equal, I thought that data was processed in the same executor which execute the action at the end, but I am not sure about that watching the results.


Does someone the idea how to force the task to NODE_LOCAL or PROCESS_LOCAL??
collectis never a good thing unless really necessary - maasghour=13andhour=14, I want to be aware which differents hours I have by partition in order to filter the dataframe in the different hours and insert in their respective Hive partitions with a ìnsert into` statement. You can see the DAG that I have attached to the question. - user8237526