4. 检查 {dfs.name.dir} 此目录中是否有了文件,hadoop fsck / 查看文件内容是否正常。
如果一切OK,NameNode节点恢复正常。 Good Luck!
如对以上有疑问或建议请Mail to: biansutao# gmail # com
重要提示: 在一小间隔中间添加到HDFS中的数据将在恢复数据的时候丢失。
如果想减少这种数据丢失,可以把Checkpoint 的时间调低一点,比方说5分钟,15分钟。
这个需要综合考虑数据量和集群规模。
通过设置 {dfs.name.dir} 设置多个目录(例如:NFS)可以保存NameNode节点的fsimage和edits文件。
这样减少数据的损失。
<property>
<name>dfs.name.dir</name>
<value>${hadoop.tmp.dir}/dfs/name</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>