title: mapred-site.xml not overriding parameters from mapred-default.xml
body: <p>I am using Hadoop version 0.20.2 (Cloudera distribution cdh3u6) and seeing issues.  From what I understand, if I set a value in <code>/etc/hadoop/conf/mapred-site.xml</code>, it should override the Hadoop default automatically.  So I set a variable as follows:</p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;mapred.child.java.opts&lt;/name&gt;
    &lt;value&gt;-Xmx1024m&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>However, this has no effect.  Now, I know the file is being read by hadoop, because if I set the variable to final (<code>&lt;final&gt;true&lt;/final&gt;</code>) then the setting <strong>does</strong> apply to my jobs.  However, from what I understand this should not be necessary because <code>mapred-site.xml</code> should be loaded AFTER <code>mapred-default.xml</code> so it should simply override it.</p>
  
  <p>You might ask, is something else later in the chain also overriding the setting from <code>mapred-site.xml</code>?  That would be a logical conclusion but I can't find any evidence of this.  I have job configuration files that end up in <code>/var/log/hadoop</code> and handily state where their properties are loaded from.  So I get values like this:</p>
  
  <pre><code>&lt;property&gt;&lt;!--Loaded from /var/hadoop/mapred/local/jobTracker/job_201401081300_0009.xml--&gt;&lt;name&gt;mapred.child.java.opts&lt;/name&gt;&lt;value&gt;-Xmx200m&lt;/value&gt;&lt;/property&gt;
  </code></pre>
  
  <p>The referenced job "subconfigurations" under the <code>/var/hadoop/mapred/local/jobTracker</code> are ephemeral and only exist when the job is running, however inspecting one from a running job I found the following:</p>
  
  <pre><code>&lt;property&gt;&lt;!--Loaded from mapred-default.xml--&gt;&lt;name&gt;mapred.child.java.opts&lt;/name&gt;&lt;value&gt;-Xmx200m&lt;/value&gt;&lt;/property&gt;
  </code></pre>
  
  <p>So as the final job config eventually seems to be loaded simply from <code>mapred-default.xml</code> -- so why would the value from <code>mapred-site.xml</code> not override it?</p>
  
  <p>Although setting <code>final</code> solves the problem, I want to understand what is going on in this situation, as it could indicate other issues.  Also, this generates a warning: <code>WARN org.apache.hadoop.conf.Configuration: /var/hadoop/mapred/local/jobTracker/job_201401081300_0009.xml: a attempt to override final parameter: mapred.child.java.opts;  Ignoring.</code>.  This warning suggests that another configuration parser further down the chain is indeed overriding the setting from <code>mapred-site.xml</code> -- but how can I find out what it is?</p>