When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?

When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?
A . When the types of the reduce operation’s input key and input value match the types of the reducer’s output key and output value and when the reduce operation is both communicative and associative.
B . When the signature of the reduce method matches the signature of the combine method.
C . Always. Code can be reused in Java since it is a polymorphic object-oriented programming language.
D . Always. The point of a combiner is to serve as a mini-reducer directly after the map phase to increase performance.
E . Never. Combiners and reducers must be implemented separately because they serve different purposes.

Answer: A

Explanation:

You can use your reducer code as a combiner if the operation performed is commutative and associative.

Reference: 24 Interview Questions & Answers for Hadoop MapReduce developers, What are combiners? When should I use a combiner in my MapReduce Job?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments