## MapReduce Basic Programming Model

Moderator: Concepts and Technologies for DS and BDP

giri7io
Neuling
Beiträge: 1
Registriert: 2. Feb 2015 19:50

### MapReduce Basic Programming Model

Hi,
I have quick question regarding the reduce model mentioned in the slide ( chapter 4: mapreduce slide:13,14).

The reduce model is given like this:

Code: Alles auswählen

Reduce: (k2, list(v2)) → list(v2) 
Isn't it supposed to produce a new list in the output? something like this:

Code: Alles auswählen

Reduce: (k2, list(v2)) → list(v3) 
Thank you for your time.

robhe
Neuling
Beiträge: 5
Registriert: 11. Jul 2017 16:59

### Re: MapReduce Basic Programming Model

I think v2 indicates only the domain/type of the values which remain unchanged after reduce.

hc84caji
Neuling
Beiträge: 1
Registriert: 13. Jul 2017 19:28

### Re: MapReduce Basic Programming Model

Can you please explain these map and reduce representations mentioned on slide 11 and 12 of MapReduce

map : map::(a→b)→[a]→
reduce : foldl :: (b → a → b) → b → [a] → b

Thanks

yc81reja
Erstie
Beiträge: 12
Registriert: 18. Apr 2015 16:25

### Re: MapReduce Basic Programming Model

That's the haskell notation about functions type
map takes a lambda that takes parameter of type a returning type b, and takes a list of type a, returns list of type b
foldl takes a lambda that takes parameters of type b and a, where the second parameter of type b is "zero" and each of the third parameter of list of type a is applied to the lambda. Then a single return value of type b is returned