lordingtar February 2016

Cannot create directory /home/hadoop/hadoopinfra/hdfs/namenode/current

I get the error

Cannot create directory /home/hadoop/hadoopinfra/hdfs/namenode/current

While trying to install hadoop on my local Mac.

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

mapred-site.xml:

<configuration>

   <property> 
      <name>mapreduce.framework.name</name>
      <value>yarn</value>
   </property>
</configuration>

hdfs-site.xml:

<configuration>
    <property>
      <name>dfs.replication</name>
      <value>1</value>
    </property>

   <property>
      <name>dfs.name.dir</name>
      <value>file:///home/hadoop/hadoopinfra/hdfs/namenode </value>
   </property>

   <property>
      <name>dfs.data.dir</name> 
      <value>file:///home/hadoop/hadoopinfra/hdfs/datanode </value> 
   </property>
</configuration>

core-site.xml:

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

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

I'm using this tutorial, and "hadoop" in the file path is replaced by my username.

Answers


rodgersk410 February 2016

In the step where you need to verify the hadoop installation, instead of 'hdfs namenode -format' use '/usr/local/hadoop/bin/hdfs namenode -format'

Found this answer from: hadoop java.io.IOException: while running namenode -format

Post Status

Asked in February 2016
Viewed 2,679 times
Voted 5
Answered 1 times

Search




Leave an answer