title: Hadoop/MR temporary directory
body: <p>I've been struggling with getting Hadoop and Map/Reduce to start using a separate temporary directory instead of the /tmp on my root directory.</p>
  
  <p>I've added the following to my core-site.xml config file:</p>
  
  <pre><code>&lt;property&gt;
      &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
      &lt;value&gt;/data/tmp&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>I've added the following to my mapreduce-site.xml config file:</p>
  
  <pre><code>&lt;property&gt;
      &lt;name&gt;mapreduce.cluster.local.dir&lt;/name&gt;
      &lt;value&gt;${hadoop.tmp.dir}/mapred/local&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;mapreduce.jobtracker.system.dir&lt;/name&gt;
      &lt;value&gt;${hadoop.tmp.dir}/mapred/system&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;mapreduce.jobtracker.staging.root.dir&lt;/name&gt;
      &lt;value&gt;${hadoop.tmp.dir}/mapred/staging&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
     &lt;name&gt;mapreduce.cluster.temp.dir&lt;/name&gt;
     &lt;value&gt;${hadoop.tmp.dir}/mapred/temp&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>No matter what job I run though, it's still doing all of the intermediate work out in the /tmp directory.  I've been watching it do it via df -h and when I go in there, there are all of the temporary files it creates.  </p>
  
  <p>Am I missing something from the config?</p>
  
  <p>This is on a 10 node Linux CentOS cluster running 2.1.0.2.0.6.0 of Hadoop/Yarn Mapreduce.</p>
  
  <p>EDIT:
  After some further research, the settings seem to be working on my management and namednode/secondarynamed nodes boxes.  It is only on the data nodes that this is not working and it is only with the mapreduce temporary output files that are still going to /tmp on my root drive, not the my data mount where I have set in the configuration files.</p>