Archive for map reduce

Mapreduce simplified

Mapreduce is a process to find out number of similar banana in Iraq and Afganistan.

For example, you want to know how many green and white banana in Iraq and Afganistan. So, you hire a terrorist in these two countries to count green and white banana and ask them to sent back the result to you.
Counting algorithm is secret as it may disclose the location of terrorist. The result:

std::map<string, int> afganbanana;

afganbanana['white'] =100;

afganbanana['green'] =700;

std::map<string,int> iraqbanana;

iraqbanana['white'] =-900;

iraqbanana['green'] =-700;

You recieved the data and merge this two map by a really complicated reduce function:

map<string,int> reduce(map<string,int> banana1, map<string, int> banana2){

return merge(banana1, banana2);

}

reduce(iraqbanana, afganbanana)

cout<<banana['white']<<”:”<<banana['green]<<endl;

output:

-800 : 0
I think very few people are concern about mapreduce except FBI. FBI is investing huge in google to research about the

correlation between white banana and Osama bin laden.

Leave a Comment