title: Hadoop Number of Reducers Configuration Options Priority
body: <p>What are the priorities of the following 3 options for setting number of reduces? In other words, if all three are set, which one will be taken into account?</p>
  
  <p><strong>Option1:</strong></p>
  
  <pre><code>setNumReduceTasks(2) within the application code
  </code></pre>
  
  <p><strong>Option2:</strong> </p>
  
  <pre><code>-D mapreduce.job.reduces=2 as command line argument
  </code></pre>
  
  <p><strong>Option3:</strong> </p>
  
  <pre><code>through $HADOOP_CONF_DIR/mapred-site.xml file
  
   &lt;property&gt;
    &lt;name&gt;mapreduce.job.reduces&lt;/name&gt;
    &lt;value&gt;2&lt;/value&gt;
   &lt;/property&gt;
  </code></pre>