title: how output files(part-m-0001/part-r-0001) are created in map reduce
body: <p>I understand that the map reduce output are stored in files named like part-r-* for reducer and part-m-* for mapper.</p>
  
  <p>When I run  a mapreduce job sometimes a get the whole output in a single file(size around 150MB), and sometimes for almost same data size I get two output files(one 100mb and other 50mb). This seems very random to me. I cant find out any reason for this.</p>
  
  <p>I want to know how its decided to put that data in a single or multiple output files. and if any way we can control it.</p>
  
  <p>Thanks</p>