Cannot create directory /home/hadoop/hadoopinfra/hdfs/namenode/current
<p>I get the error</p>

<pre><code>Cannot create directory /home/hadoop/hadoopinfra/hdfs/namenode/current
</code></pre>

<p>While trying to install hadoop on my local Mac. </p>

<p>What could be the reason for this? Just for reference, I'm putting my xml files down below:</p>

<p>mapred-site.xml:</p>

<pre><code>&lt;configuration&gt;

   &lt;property&gt; 
      &lt;name&gt;mapreduce.framework.name&lt;/name&gt;
      &lt;value&gt;yarn&lt;/value&gt;
   &lt;/property&gt;
&lt;/configuration&gt;
</code></pre>

<p>hdfs-site.xml:</p>

<pre><code>&lt;configuration&gt;
    &lt;property&gt;
      &lt;name&gt;dfs.replication&lt;/name&gt;
      &lt;value&gt;1&lt;/value&gt;
    &lt;/property&gt;

   &lt;property&gt;
      &lt;name&gt;dfs.name.dir&lt;/name&gt;
      &lt;value&gt;file:///home/hadoop/hadoopinfra/hdfs/namenode &lt;/value&gt;
   &lt;/property&gt;

   &lt;property&gt;
      &lt;name&gt;dfs.data.dir&lt;/name&gt; 
      &lt;value&gt;file:///home/hadoop/hadoopinfra/hdfs/datanode &lt;/value&gt; 
   &lt;/property&gt;
&lt;/configuration&gt;
</code></pre>

<p>core-site.xml:</p>

<pre><code>&lt;configuration&gt;
  &lt;property&gt;
    &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
    &lt;value&gt;/usr/local/Cellar/hadoop/hdfs/tmp&lt;/value&gt;
    &lt;description&gt;A base for other temporary directories.&lt;/description&gt;
  &lt;/property&gt;
  &lt;property&gt;
    &lt;name&gt;fs.default.name&lt;/name&gt;
    &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;
  &lt;/property&gt;
&lt;/configuration&gt;
</code></pre>

<p>I think my problem lies in my hdfs-site.xml file, but I'm not sure how to pinpoint/change it.</p>

<p>I'm using <a href="http://www.tutorialspoint.com/hadoop/hadoop_enviornment_setup.htm" rel="noreferrer">this</a> tutorial, and "hadoop" in the file path is replaced by my username.</p>