Most of Hadoop MapReduce programs are like this:
public class MyApp extends Configured Implements Tool {
@Override
public int run(String[] args) throws Exception {
Job job = new Job(getConf());
/* process command line options */
return job.waitForCompletion(true) ? 0 : 1;
}
public static void main(String[] args) throws Exception {
int exitCode = ToolRunner.run(new MyApp(), args);
System.exit(exitCode);
}
}
What is the usage of Configured
? As Tool
and Configured
both have getConf()
and setConf()
in common. What does it provide to our application?