I\'m using new Hadoop API and looking for a way to pass some parameters (few strings) to mappers.
How can I do that?
This solutions
In the main method set the required parameter as below or using the -D command line option while running the job.
Configuration conf = new Configuration();
conf.set("test", "123");
Job job = new Job(conf);
In the mapper/reducer get the parameter as
Configuration conf = context.getConfiguration();
String param = conf.get("test");