title: Sampling Records from Hadoop Mapper
body: <p>I have a dataset whose key consists of 3 parts: a, b and c. In my mapper, I would like to emit records with the key as 'a' and the value as 'a,b,c' </p>
  
  <p>How do I emit 10% of the total records for each 'a' that is detected from the mapper in Hadoop? Should one consider saving the total number of records seen for each 'a' from a previous Map-Reduce job in a temp file?</p>