Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Big Data Hadoop & Spark by (6.5k points)
The default seems to be having only 1 reducer when it executes.

1 Answer

0 votes
by (11.3k points)

You can add this:

Dmapred.reduce.tasks=x  (where x is the number of reducers you'd like to use)

as an option to your MapReduce execution code to set the number of reducers explicitly. For example, this would how to execution command would look like:

hadoop jar wordcount.jar WordCount -Dmapred.reduce.tasks=2 wordcountiput wordcountoput

Here, the number of reducers is 2.

Keep in mind that the significance of using a specified number of reducers is only practical in a multiple node hadoop cluster. To understand why using a specified number of reducers can be advantageous in a real-world scenario, you should take up a big data course.

Browse Categories

...