1public static class MyMapper extends MapReduceBase implements Mapper<...> {
2
3 Integer myIntegerOption;
4 String myStringOption;
5
6 @Override
7 public void configure(JobConf job) {
8 super.configure(job);
9 myIntegerOption = job.getInt("myIntOption", -1);
10 // nb: last arg is the default value if option is not set
11 myStringOption = job.get("myStringOption", "notSet");
12 }
13
14 @Override
15 public void map(... key, ... value,
16 OutputCollector<..> output, Reporter reporter) throws IOException {
17 // here you can use the options in your processing
18 processRecord(key, value, myIntOption, myStringOption);
19 }
20
21}
22