I'm running a spark streaming app the receives file paths on HDFS from Kafka and should open these files and perform some kind of computation on them.
The problem is that I cannot enjoy the benefits of data locality as the executors might run on any node and the executor that opens the file is not necessarily the one who holds it.
Is there a way to dynamically open files in the manner I presented while maintaining data locality ?
Thanks,
Daniel