This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Please read before you get to the code. So that you understand the basics before you try to come up with an example or code.
As the example you have given we would not need map reduce directly,
you can make an example out of it however for your understanding, however it will be much more complex compared to wordcount example