Search code examples
javahadoopmapreducehadoop-yarn

Start mapreduce job on hadoop 2.2 (Yarn) from java application


I'm trying to call a mapreduce job from a java application. In former hadoop versions (1.x) I created a Configuration object and a Job object, set mapred.job.tracker and fs.default.name in the Configuration and ran the Job. Now, in hadoop 2.x the job tracker does not exist anymore neither exists there any documentation on how to programatically run MR1 jobs. Any ideas?

What I'm looking for is an explaination as given here: Calling a mapreduce job from a simple java program


Solution

  • The MR Client API is the same for the Legacy MR and YARN. The properties can be set on the Configuration object instead of specifying in the xml configuration files. Check the documentation and the required configurations here and here to setup and execute a simple MR job in YARN.