September 2017
Beginner to intermediate
412 pages
8h 55m
English
After installing Hadoop you can run its version of MapReduce quite easily. As we have seen, this amounts to writing your own versions of the map() and reduce() methods to solve the particular problem. This is done by extending the Mapper and Reducer classes defined in the package org.apache.hadoop.mapreduce.
For example, to implement the WordCount program, you could set your program up like the one shown in Listing 11-5.

Listing 11-5. WordCount program in Hadoop
The main class has two nested classes named WordCountMapper and WordCountReducer. These extend the corresponding Hadoop Mapper and Reducer classes, with a few details omitted. ...
Read now
Unlock full access