input: (in_key, in_value)
output: (out_key, intermediate_value) list
input: (out_key, intermediate_Value list)
output: out_value list

map(String input_key, String input_value)
// input_key: document name
// input_value: document contents
for each word w in input_value:
EmitIntermediate(w, "1");
reduce(String output_key, Iterator Intermediate_values)
// output_key: a word
// output_values: a list of counts
int result = 0;
for each v in intermediate_values:
result += ParseInt(v);
Emit(AsStirng(result));
Selection is capture by the mapper alone, reducer is just the identity function.
For
Map: For each t in the input, if C(t) is true, then emit the key-value pair (t, t), i.e., set both key and value to t.
Reduce: For each (t, t) from any of many mappers, emit (t, t).
The key is hashed to be distributed to reducers.
Map: For each t in the input, construct t a tuple t' containing only the columns in A and emit the key-value pair (t', t'), i.e., set both key and value to t'.
Reduce: For each t' from any of many mappers, there will be one or more (t', t') pairs (i.e., the reducer takes pairs of the form (t', [t', t', ... , t']), emit exactly one pair (t', t') for each key t' for deduplication.
Map: For each t in the input, emit the key-value pair (t, t), i.e., set both key and value to t.
Reduce: For each key t from any of many mappers, there will be one or two (t, t) pairs (i.e., the reducer takes pairs such as (t, [t]) or (t, [t, t]), emit exactly one pair (t, t) for each key t.
Map: For each t in the input, emit the key-value pair (t, t), i.e., set both key and value to t
Reduce: For each key t from any of many mappers, there will be one or two (t, t) pairs (i.e., the reducer takes pairs such as (t, [t]) or (t [t,t]). If second element is a singleton, emit nothing, otherwise emit exactly one pair (t, t) for each key t.
Map: For each t in the input, if t R, emit the key -value pair (t, 'R'), other wise emit the key-value pair (t, 'S'), where the second element may be implemented economically with a single bit to indicate membership in either of the two input relations.
Reduce: For each key t from any of many mappers, if the associated value list is ['R'], then emit exactly one pair (t,t) for each key t, otherwise emit nothing.
Map: For each t in the input, if t R, emit key-value pair (b, ('R',a)), otherwise emit the key-value pair (b, ('S', c)), where a, b, c are values in the columns A, B, C, rep..
Reduce: For each key b from any of many mappers, the associated value list will be contain pairs of the form ('R', a) or ('S',c ). Then computefor each key b list = [] for each ('R', a) for each ('S', c) list.append((a, b, c)) emit(b, list)
Map: For each tuple (a, b, c) in the input, emit the key-value pair (a, b), i.e., the grouping attribute is the obvious key and, under map-reduce semantics, the desired partition of the input follows from that.
Reduce: For each key a from any of many mappers, there will be one or more (a, b) pairs (i.e., the reducer takes pairs of the form (a, [b1, b2, ..., bn])), emit exactly one pair (a, x) for each key a, where x = ([b1, b2,..., bn]) (e.g., if is Sum, then x = b1+ b2+ ... + bn)