Page 1 of 1

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

Posted: Fri Apr 29, 2022 6:35 am
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 28 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]