Suppose that you are the manager of a grocery chain in Hong Kong, and Table 1 shows the StoreIDs under your management.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Suppose that you are the manager of a grocery chain in Hong Kong, and Table 1 shows the StoreIDs under your management.

Post by answerhappygod »

Suppose That You Are The Manager Of A Grocery Chain In Hong Kong And Table 1 Shows The Storeids Under Your Management 1
Suppose That You Are The Manager Of A Grocery Chain In Hong Kong And Table 1 Shows The Storeids Under Your Management 1 (128.28 KiB) Viewed 27 times
Suppose that you are the manager of a grocery chain in Hong Kong, and Table 1 shows the StoreIDs under your management. Each row of the table includes the city, district, StoreID of a store, and the ProductID with quantity in the store. For instance, the first row indicates that StoreID 9 is at NT, Hong Kong, and the quantity of ProductID 1 in the store is 2. City District StoreID ProductID Quantity of ProductID Hong Kong NT 9 2 Hong Kong HK 3 3 3 Hong Kong HK 2 2 11 Hong Kong KL 7 2 14 Hong Kong NT 11 3 19 Hong Kong KL 5 2 23 Hong Kong HK 1 25 Hong Kong NT 10 2 30 Hong Kong KL 4 2 40 Hong Kong 6 1 45 Hong Kong NT 8 51 Table 1 Store and Product Information Based on Table 1, you want to get some data analytical insights by using a MapReduce framework. In particular, (a) Write pseudo-code for Mapper and Reducer to find how many distinct ProductIDs in each district. Mention the input and output (key, value) pairs of both the Maj per and Reducer. [10 marks] TADION KL (b) Write pseudo-code for Mapper and Reducer to find the total quantity of each ProductID in each district. Mention the input and output (key, value) pairs of both the Mapper and Reducer. [10 marks]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply