title: Running MapReduce applications on Apache YARN using Java Client
body: <p>I want to run MapReduce application on a YARN cluster using Java client code. For example, I want to submit WordCount, which resides in <code>hadoop-examples.jar</code> file to a YARN cluster of 16 machines using Java APIs. </p>
  
  <p>I tried to follow <a href="http://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html" rel="nofollow noreferrer">this tutorial</a>, but I did not get what is the application master jar. Is it the same as <code>hadoop-examples.jar</code>? Or another jar contains the ApplicationMaster logic?</p>
  
  <p>I appreciate if you have a Java client code example from a to z to submit MapReduce application to YARN.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>What am I intersted to know is to submit MapReduce job as Yarn application using Yarn APIs (e.g. YarnClient, ApplicationClientProtocol, ...) which is different from <a href="https://stackoverflow.com/questions/9849776/calling-a-mapreduce-job-from-a-simple-java-program">this question</a>.</p>