Cloudera
CCD-410 · Question #27
When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?
The correct answer is A. When the types of the reduce operation's input key and input value match the types of the reducer's output. You can use your reducer code as a combiner if the operation performed is commutative and
Developing with Apache Spark Core
Question
When can a reduce class also serve as a combiner without affecting the output of a MapReduce program?
Options
- AWhen the types of the reduce operation's input key and input value match the types of the reducer's output
- BWhen the signature of the reduce method matches the signature of the combine method.
- CAlways. Code can be reused in Java since it is a polymorphic object-oriented programming language.
- DAlways. The point of a combiner is to serve as a mini-reducer directly after the map phase to increase
- ENever. Combiners and reducers must be implemented separately because they serve different purposes.
How the community answered
(53 responses)- A77% (41)
- B4% (2)
- C6% (3)
- D11% (6)
- E2% (1)
Explanation
You can use your reducer code as a combiner if the operation performed is commutative and
Topics
#combiner#reducer#type compatibility#MapReduce
Community Discussion
No community discussion yet for this question.