Question - What are the core methods of a reducer?
Answer -
The three core methods of a reducer are as follows:
- setup(): This method is used for configuring various parameters such as input data size and distributed cache.
- public void setup (context)
- reduce(): This method is the heart of the reducer and is always called once per key with the associated reduced task.
- public void reduce(Key, Value, context)
- cleanup(): This method is called to clean the temporary files, only once at the end of the task.
public void cleanup (context)