There used to be property for setting the number of map tasks, which was setNumMapTasks. Bur it was merely a hint to the framework, and could not guarantee that you'll get only the specified number of maps. The map creation is actually governed by the InputFormat you are using in your job. And this is the reason it is not supported anymore.
If you are not happy with the number of mappers created by the framework, you could try tweaking the values of following 2 properties as per your requirements :
- mapred.min.split.size
- mapred.max.split.size