DS-200 · Question #25
You have a data file that contains two trillion records, one record per line (comma separated). Each record lists two friends and unique message sent between them. Their names will not have commas…
The correct answer is B. def mapper1 (line). See the full explanation below for the reasoning.
Question
You have a data file that contains two trillion records, one record per line (comma separated). Each record lists two friends and unique message sent between them. Their names will not have commas. Michael, John, Pabst, Blue Ribbon Tiffany, James, BMX Racing John, Michael, Natural Lemon Flavor Analyze the pseudo code examples below and determine which set of mappers and reducers in the below pseudo code snippets will solve for the mean number of messages each user sends to all of the friends? For example pseudo code may have three friends to whom he sends 6, 10, and 200 messages, respectively, so Michael's mean would be (6+10+200)/3. The solution may require a pipeline of two MapReduce jobs.
Options
- Adef mapper1 (line):
- Bdef mapper1 (line):
- Cdef mapper1 (line):
- Ddefmapper (line):
How the community answered
(21 responses)- A5% (1)
- B76% (16)
- C14% (3)
- D5% (1)
Community Discussion
No community discussion yet for this question.