I was going through the SparkContext.textFile() and I was wondering at that point does Spark communicates with HDFS. Since when you download Spark binaries you also specify the Hadoop version you will use, I'm guessing it has its own client that calls HDFS wherever you specify it in the configuration files.
The goal is to instrument and log all the calls that Spark does to HDFS. Which class or classes perform these operations?