0 votes
1 view
in Big Data Hadoop & Spark by (6.1k points)
I don't wish to use default partitioning parameters. Is there any way to specify the partitions that I want to create in the MR job?

1 Answer

0 votes
by (11.3k points)
edited by

The method to use a custom partitioner for a Hadoop job, follow the following instructions:

  • Create a class and extend the Partitioner Class in your code.
  • In your new class, override the method, 'getPartition' 
  • In the MapReduce running wrapper, use the Partitioner Class method set or add the custom partitioner in the config.

In this way, you can add the custom number that you want in the code itself. In order to understand the workflow of the MapReduce program or to learn how to code MapReduce in itself and work on some projects to build up your skills, you should definitely go for hadoop certification course. 

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...