October 2018
Beginner
220 pages
5h 33m
English
Map and Reduce functions are designed to input list of (key,value) pairs and produce list of (key, value) pairs. The Mapper class provides three different methods that users can override to get the mapping activity complete:
setup: This is called once in the beginning of map call. You can initialize your variables here or get the context for Map tasks here.
map: This is called for each (key,value) in the input that is split.
cleanup: This is called again once at the end of tasks. This should close all allocations, connections, and so on.
The extended class API for Mapper is as follows:
public class <YourClassName> extends Mapper<InputKeyClass,InputValueClass,OutputKeyClass,OutputValueClass> { protected
Read now
Unlock full access