title: Spark-Obtaining file name in RDDs
body: <p>I am trying to process 4 directories of text files that keep growing every day. What I need to do is, if somebody is trying to search for an invoice number, I should give them the list of files which has it.</p>
  <p>I was able to map and reduce the values in text files by loading them as RDD. But how can I obtain the file name and other file attributes?</p>