Slide 107
Slide 107 text
MAP CODE
public static class
extends
map ( InputKey, InputValue) => Set of (IntermediateKey,IntermediateValue)
public void map(Object key, Text value, Context context
) throws IOException, InterruptedException {
StringTokenizer itr = new StringTokenizer(value.toString());
while (itr.hasMoreTokens()) {
word.set(itr.nextToken());
context.write(word, one);
private
private final static
0 Twinkle Twinkle Little Star
Little 1
Star 1
Twinkle 1,1