We cannot do aggregation (addition) in a mapper because, sorting is not done in a mapper. Sorting happens only on the reducer side. Mapper method initialization depends upon each input split. While doing aggregation, we will lose the value of the previous instance. For each row, a new mapper will get initialized. For each row, input split again gets divided into mapper, thus we do not have a track of the previous row value.
TOP 100 HADOOP INTERVIEW QUESTIONS ANSWERS PDF, REAL TIME HADOOP INTERVIEW QUESTIONS GATHERED FROM EXPERTS, TOP 100 BIG DATA INTERVIEW QUESTIONS, HADOOP ONLINE QUIZ QUESTIONS, BIG DATA MCQS, HADOOP OBJECTIVE TYPE QUESTIONS AND ANSWERS
Home » Unlabelled » Why we cannot do aggregation (addition) in a mapper? Why we require reducer for that? | Hadoop Questions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment