Suppose there is following map reduce job
Mapper:
setup() initializes some state
map() add data to state, no output
cleanup() ouput state to context
Reducer:
aggregare all states into one output
How such job could be implemented in spark?
Additional question: how such job could be implemented in scalding? I'm looking for example wich somehow makes the method overloadings...