Map() method
The following are characteristics of the map function, including examples of the input and output and the action the map method performs.
- Input: A line key and a line
- Output: A (word, 1) pair for each occurrence of a word in the line
- Action: Splits the line into words
Input data
KEY | LINE
-----+-----------------------------------
2 | Hello map Goodbye reduce
3 | Hello INZA
1 | Hello World Bye World
Intermediate output data
WORD | COUNT
--------+--------------------------------
Hello | 1
map | 1
Goodbye | 1
reduce | 1
Hello | 1
INZA | 1
Hello | 1
World | 1
Bye | 1
World | 1