Question: 2 . ( 1 2 % ) MapReduce. Suppose that we are given the employee records, each of which is represented as a string

2.(12\%) 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 (i.e., no other combining methods should be used).
Write down the pseudo-code of the map, combine, and reduce functions based on the following interfaces:
- map (Integer employeeID, String record)
- combine (Type1 k, Type2[v1, v2,]])
- reduce (Type3 k, Type4[v1, v2,])
You'll need to decide the correct data types in the combine and reduce functions.
2 . ( 1 2 \ % ) MapReduce. Suppose that we are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!