Professional Documents
Culture Documents
Internal Assessment Practical 2
Internal Assessment Practical 2
a) Based on class Books and the following table, define two subclasses named as
OrderBook and UsedBook,
OrderBook UsedBook
Additional attribute weight Quantity
Price calculation rate*weight rate*quantity
i) MapReduce
a. Put the attached file ‘internet_users.csv’ to a hdfs directory.
b. Write a MapReduce program to read the column “Country” and “Percent” from that
file.
c. Process them and display the sum of monthly charge per service.
d. Upload the Java file in a zip along with the rest of the files
e. Example output:
India 56.9437858753115
China 70.0527627444257
ii) PIG and HIVE
a) Load the internet_users.csv file in PIG
b) Display the Country and Percent of users paying more than 92%.
c) Count the number of Regions in the dataset
d) Load the same table into Hive.
e) Display the least number of internet_users from the dataset.
(35)