3 ms·
Let's use a simple data mining example with logs. You want to count the number of users by region visiting your website to understand where your users are comin
by agibsonccc 12y ago
Let's use a simple data mining example with logs. You want to count the number of users by region visiting your website to understand where your users are coming from.
In your log files you have the IP which you can use to geolocate those users.
These counts can be caluclated in parallel.
We do this by first "mapping" each line in a log file extracting out the IP.
The output of map will be a geolocated hash by region.
Reduce's goal is to calculate an answer based on these keys.
If we think about the output of map being the geo location, we can then collect a count by geo located hash of where our users are coming from.
Map: Map the raw input to some key value space
Reduce: Reduce the output of the map to
some aggregate result, think of this like the sql aggregation functions
Hope that helps!