Example: WordCount v1.0
You can map and reduce data based on a variety of criteria. A common example is the JavaWordCount class. As the name suggests, WordCount maps (extracts) words from an input source and reduces (summarizes) the results, returning a count of each word. The versions of WordCount in this tutorial are implemented to take advantage of the features in the MRv2 API.
The command-line arguments to build and run WordCount v1.0 are provided throughout the example. Many of these commands are consolidated into a Makefile for your convenience (however, the Makefile compile command does not work with CDH parcels: use the command-line alternative provided to compile the sample classes).
Continue reading: