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.