gpt4 book ai didi

ubuntu - java.io.IOException:在Hadoop安装期间无法创建目录/home/dataflair/hdata/dfs/name/current

转载 作者:行者123 更新时间:2023-12-02 21:18:24 34 4
gpt4 key购买 nike

我正在安装hadoop。一切顺利,但是当我尝试使用以下命令格式化时:

//Format the name node:
$bin/hdfs namenode -format

我收到以下错误:
> 16/06/30 12:58:12 WARN namenode.NameNode: Encountered exception during
> format: java.io.IOException: Cannot create directory
> /home/dataflair/hdata/dfs/name/current at
> org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:334)
> at
> org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:546)
> at
> org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:567)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:148)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:930)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1368)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1493)
> 16/06/30 12:58:12 FATAL namenode.NameNode: Failed to start namenode.
> java.io.IOException: Cannot create directory
> /home/dataflair/hdata/dfs/name/current at
> org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.clearDirectory(Storage.java:334)
> at
> org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:546)
> at
> org.apache.hadoop.hdfs.server.namenode.NNStorage.format(NNStorage.java:567)
> at
> org.apache.hadoop.hdfs.server.namenode.FSImage.format(FSImage.java:148)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:930)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1368)
> at
> org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1493)
> 16/06/30 12:58:12 INFO util.ExitUtil: Exiting with status 1 16/06/30
> 12:58:12 INFO namenode.NameNode: SHUTDOWN_MSG:
> /************************************************************
> SHUTDOWN_MSG: Shutting down NameNode at rahul-knoldus/127.0.1.1
> ************************************************************/

我已经尝试过 sudo hdfs namenode -format但它不起作用。

最佳答案

以下步骤解决了我的问题-
sudo su/usr/local/hadoop/bin/hdfs namenode -format

关于ubuntu - java.io.IOException:在Hadoop安装期间无法创建目录/home/dataflair/hdata/dfs/name/current,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38116783/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com