Hopefully that last one was not too bad. This one is a little harder
because you have to write both the mapper and reducer. The idea is that
you have a huge set of data and you need to keep only the ones that
match. Fill in the body for the
and
for the
Love
sprite and test it.
Problem | Input | Map Domain | Map Range | Map Function | Binary reducer function | Output |
---|---|---|---|---|---|---|
All the Beatles song titles with the word "love" in it. This is effectively a "filter" operation, removing all the list elements that do not match. | All of the Beatles song titles, each song title a different list element | Song title (sentence) | a list of the song title; or an empty list | Look for the word "love" in the title, if it is there, return title as a one-element list, otherwise return the empty list | Merge all the lists together that the mappers (and other reducers) return into one big list | Same form as the input: a list of song titles, except each one has the word "love" in it. |