Hadoop - namenode 未启动 [英] Hadoop - namenode is not starting up

查看:36
本文介绍了Hadoop - namenode 未启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图以 root 用户身份运行 hadoop,我在 Hadoop 文件系统运行时执行了 namenode 格式命令 hadoop namenode -format.

I am trying to run hadoop as a root user, i executed namenode format command hadoop namenode -format when the Hadoop file system is running.

此后,当我尝试启动名称节点服务器时,它显示如下错误

After this, when i try to start the name node server, it shows error like below

13/05/23 04:11:37 ERROR namenode.FSNamesystem: FSNamesystem initialization failed.
java.io.IOException: NameNode is not formatted.
        at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:330)
        at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:100)
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:411)

我试图寻找任何解决方案,但找不到任何明确的解决方案.

I tried to search for any solution, but cannot find any clear solution.

有人可以推荐吗?

谢谢.

推荐答案

酷,我找到了解决方案.

Cool, i have found the solution.

停止所有正在运行的服务器

Stop all running server

1) stop-all.sh 

编辑文件/usr/local/hadoop/conf/hdfs-site.xml,如果缺少则添加以下配置

Edit the file /usr/local/hadoop/conf/hdfs-site.xml and add below configuration if its missing

<property>
    <name>dfs.data.dir</name>
    <value>/app/hadoop/tmp/dfs/name/data</value> 
    <final>true</final> 
    </property> 
    <property> 
    <name>dfs.name.dir</name>
    <value>/app/hadoop/tmp/dfs/name</value> 
    <final>true</final> 
</property>

同时启动 HDFS 和 MapReduce 守护进程

Start both HDFS and MapReduce Daemons

2) start-dfs.sh
3) start-mapred.sh

然后现在运行其余的步骤来运行 此链接

Then now run the rest of the steps to run the map reduce sample given in this link

注意:如果直接命令没有运行,你应该运行命令 bin/start-all.sh.

Note : You should be running the command bin/start-all.sh if the direct command is not running.

这篇关于Hadoop - namenode 未启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆