Default number of reducers

前端 未结 2 771
不知归路
不知归路 2020-12-01 08:49

In Hadoop, if we have not set number of reducers, then how many number of reducers will be created?

Like number of mappers is dependent on (total data size)

2条回答
  •  猫巷女王i
    2020-12-01 09:18

    By default the no of reducers is set to 1.

    You can change it by adding a parameter

    mapred.reduce.tasks in the command line or in the Driver code or in the conf file that you pass.

    e.g: Command Line Argument: bin/hadoop jar ... -Dmapred.reduce.tasks= or, in Driver code as: conf.setNumReduceTasks(int num);

    Recommended read: https://wiki.apache.org/hadoop/HowManyMapsAndReduces

提交回复
热议问题