title: How to sort data in descending order in map reduce?
body: <p>My reducer gives this o/p </p>
  
  <pre><code>Country-Year,Medals
  India-2008,60
  United States-2008,1237
  Zimbabwe-2008, 2
  Namibia-2009,22
  China-2009,43
  United States-2009,54
  </code></pre>
  
  <p>And i want this, sorting should happen based on medals and top three should be shown.</p>
  
  <pre><code>Country-Year,Medals
  United States-2008,1237
  India-2008,60
  United States-2009,54
  </code></pre>
  
  <p>Someone suggested me to do this sorting in custom recordreader(understood that it is used in mapper part) and i browsed through some resources but couldn't find much on sorting. Please share any ideas or link to resources. Advance thanks !</p>