2017-03-09 53 views
0

損壞後我的Hadoop在Ubuntu 16.10HDFS塊重啓

一切正常:我可以上傳輸入文件在HDFS &執行的map-reduce操作。但是,當我重新啓動我的電腦,所有的HDFS塊被損壞,NameNode會在安全模式啓動

所以我要

1)發表的安全模式

2)刪除所有損壞的區塊與

hdfs fsck -delete 

3)重新上傳輸入文件

然後它工作正常,直到下一次重新啓動。

有人可以請給我一些這方面的解決方案。 感謝

回答

0
Create folder like /dfs/ in your machine 
open hdfs-site.xml or hdfs-default.xml 
set this property "dfs.namenode.name.dir". 

    Example: 
    <property> 
     <name>dfs.namenode.name.dir</name> 
     <value>/dfs/</value> 
     <description>Determines where on the local filesystem the DFS name node 
      should store the name table(fsimage). If this is a comma-delimited list 
      of directories then the name table is replicated in all of the 
      directories, for redundancy. </description> 
    </property> 
+0

https://github.com/facebookarchive /hadoop-20/blob/master/src/hdfs/hdfs-default.xml –

+0

我已經設置了目錄...它不能解決問題 – Pizze99

+0

您是否設置了datanode目錄? –