Question: 2 . ( 1 2 % ) MapReduce. Suppose that we are given the employee records, each of which is represented as a string
MapReduce.
Suppose that we are given the employee records, each of which is represented as a string record "name, age, country, salary". Each record is identified by the employee ID denoted by an integer employeeID Our goal is to compute the average salary of all employees for each country. We use MapReduce to solve this problem.
We use the default combiner as the only combining method to improve the performance ie no other combining methods should be used
Write down the pseudocode of the map, combine, and reduce functions based on the following interfaces:
map Integer employeeID, String record
combine Type k Typev v
reduce Type k Typev v
You'll need to decide the correct data types in the combine and reduce functions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
