title: Using MultipleTextOutputFormat to control output filename in MapReduce
body: <p>Hadoop(and Java) neophyte here. I needed some help with using <code>MultipleTextOutputFormat</code> to control the output filename in MapReduce.</p>
  
  <p>Currently I am using it <a href="http://pastebin.com/ZYGNdkDM" rel="nofollow">this way</a>. And it seems to work fine. However what I am trying to change is the usage of the fields that get picked to determine the filename.</p>
  
  <p>Instead of hardcoding them to <code>field[0]</code> or <code>field[3]</code>(as is the case in the sample), I would like to pick this up(in some dynamic fashion) from say, <code>JobConf</code> as  <code>field[jobConf.get("id.offset")]</code> or <code>field[jobConf[get("date.offset")]</code>. Does anyone here know how I could go about doing this (or something to this effect i.e. it doesn't have to be <code>JobConf</code> per se)?</p>
  
  <p>Any pointers/suggestions/tips et al. would be most appreciated. Thanks.</p>