title: Hadoop: Getting the input file name in the mapper only once
body: <p>I am new in hadoop and currently working on hadoop. I have a small query.</p>
  
  <p>I have around 10 files in input folder which I need to pass to my map reduce program. I want the file Name in my mapper as my fileName contains the time at which this file got created. I saw people using FileSplit to get the file Name in mapper. If let say my input files contains million of lines then every time mapper code will be called, it will get the file Name and then extract the time from the file, which is obvious a repeated time consuming thing for the same file. Once I get the time in the mapper I do not have to again and again assign the time from the file.</p>
  
  <p>How can I achieve this?</p>