pradeep rai
pradeep rai

Reputation: 3

Hadoop Map Reduce - Number of Reducer

I have use case that has data of employee of a company of different age group. I need to find highest salary of male and female employee of three age group category.

for detail pls go to below link -

http://www.myhadoopexamples.com/2014/03/01/hadoop-mapreduce-example-with-partitioner/

My question is - Here we have only two key emited by mapper i.e male and female. and we have set 3 reducer in driver class thus 3 partition will be created.

There could be two below things -

  1. 3 reducer will be running for each 3 partition which inturn find out max female and male salary in each partioner. and gives expected result as shown in above link.

  2. Only reducer will be running actually , one of male and one for female and do the calculation

Upvotes: 0

Views: 91

Answers (1)

yanghaogn
yanghaogn

Reputation: 853

If you want to know the real num of reducers, you'd better run it on cluster.

As said in Number of reducer in map reduce, it will launch 3 reducers and 1 reducer will process no data. If you want to use all three reducers, you may change the Partioner class, like partitioning data by the age group

Upvotes: 0

Related Questions