本文介绍了无法创建目录/home/hadoop/hadoopinfra/hdfs/namenode/current的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了错误

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

尝试在我的本地Mac上安装hadoop时.

While trying to install hadoop on my local Mac.

这可能是什么原因?仅供参考,我将xml文件放在下面:

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

mapred-site.xml:

mapred-site.xml:

<configuration>

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

hdfs-site.xml:

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:

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>

我认为我的问题出在我的hdfs-site.xml文件中,但是我不确定如何查明/更改它.

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

我正在使用教程,文件路径中的"hadoop"是替换为我的用户名.

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

推荐答案

我也遇到了这个问题,这是一个权限问题.我刚刚做了:

I had this problem too and it was a permission problem. I just did:

工作!

这篇关于无法创建目录/home/hadoop/hadoopinfra/hdfs/namenode/current的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 15:33