Description

map can work with multiple kinds of inputs and outputs Input Types:

1. single value
2. (key, value) : Most common format for key value pair
3. (key, values) : GroupByKey() outputs
4. (key, values1, values2) : CoGroup() outputs
5. (key, value1, value2) : Join() outputs

Output Types:

1. return single value
2. return (key, value)
3. return no value
4. return no value, but last parameter is a output channel