重新启动后hdfs块损坏

u91tlkcl  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(399)

我在ubuntu16.10上有hadoop
一切正常:我可以上传输入文件在hdfs和执行Map减少操作。但当我重新启动电脑时,所有的hdfs块都损坏了,namenode以安全模式启动
所以我必须
1) 离开安全模式
2) 删除所有损坏的块

  1. hdfs fsck -delete

3) 重新上载输入文件
在下次重新启动之前,它可以正常工作。
有人能给我一些解决办法吗。谢谢

4bbkushb

4bbkushb1#

我解决了我的问题。我用这个链接来检查我的配置文件http://www.bogotobogo.com/hadoop/bigdata_hadoop_install_on_ubuntu_single_node_cluster.php
我忘了用 sudo chown -R hduser:hadoop /usr/local/hadoop_tmp 在我的hdfs目录上

6fe3ivhb

6fe3ivhb2#

  1. Create folder like /dfs/ in your machine
  2. open hdfs-site.xml or hdfs-default.xml
  3. set this property "dfs.namenode.name.dir".
  4. Example:
  5. <property>
  6. <name>dfs.namenode.name.dir</name>
  7. <value>/dfs/</value>
  8. <description>Determines where on the local filesystem the DFS name node
  9. should store the name table(fsimage). If this is a comma-delimited list
  10. of directories then the name table is replicated in all of the
  11. directories, for redundancy. </description>
  12. </property>

相关问题