Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Hadoop comes with a library of mappers and reducers for commonly used functions. They are listed with brief descriptions in Table 8-2. For further information on how to use them, please consult their Java documentation.
Table 8-2. MapReduce library classes
| Classes | Description |
|---|---|
ChainMapper, ChainReducer | Run a chain of mappers in a single mapper, and a reducer
followed by a chain of mappers in a single reducer.
(Symbolically: M+RM*, where
M is a mapper and R is a reducer.) This can
substantially reduce the amount of disk I/O incurred compared to
running multiple MapReduce jobs. |
FieldSelectionMapReduce | A mapper and a reducer that can select fields (like the
Unix cut command) from the
input keys and values and emit them as output keys and
values. |