Question
In pseudocode rather than actual java, c, or python code write Map and Reduce functions in pseudocode for the following problem: Assume that you have
In pseudocode rather than actual java, c, or python code write Map and Reduce functions in pseudocode for the following problem:
Assume that you have the Twitter follower list for a large number of users. The follower list is provided in the following format:
first user's twitter handle, second user's twitter handle to indicate that the second user is a follower of the first user.
For example, alice01, bob02 would indicate that bob02 follows alice01.
1. Given input data containing many such user, follower pairs, write map and reduce functions to calculate the total number of followers for each user. The output file should contain the user names followed by a comma followed by a number indicating the number of followers of the user.
For example, if alice01 has 7 followers, then the output should contain the line alice01, 7
[Hint: You can adapt the word count example to solve the above problem]
2. Given input data containing many such user, follower pairs, write map and reduce functions to calculate the number of common followers for all pairs of users.
For example, if alice01 and bob02 has 3 common followers, then the output should contain the line alice01, bob02, 3
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started