hadoop namenode不以“sbin / start-dfs.sh”开头,而是以“bin / hadoop namenode”开头(尽管没有显示错误)

时间:2017-08-13 00:49:24

标签: linux hadoop hadoop2

如果我跑:

sbin/start-dfs.sh 

然后,尽管打印,它实际上并没有启动名称节点:

Starting namenodes on [0.0.0.0]
0.0.0.0: starting namenode, logging to /home/myuser/apps/hadoop-2.7.4/logs/hadoop-myuser-namenode-mybox.out
localhost: starting datanode, logging to /home/myuser/apps/hadoop-2.7.4/logs/hadoop-myuser-datanode-mybox.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/myuser/apps/hadoop-2.7.4/logs/hadoop-myuser-secondarynamenode-mybox.out

BUT 如果我改为bin/hadoop namenode,那么namenode就会启动。为什么呢?

1 个答案:

答案 0 :(得分:0)

我假设你的机器上有hadoop-2。*,

sbin / start-dfs.sh

您的输出似乎没问题, 检查jps或尝试登录namenode url,

bin / hadoop namenode:

使用gedit或任何编辑器打开$ HADOOP_HOME / bin / hadoop文件, 验证它对参数 namenode

的作用

通常用于格式化namenode,使用命令 hadoop或hdfs namenode -format。

用于启动dfs和yarn

<强> start-dfs.sh

<强> start-yarn.sh

将使用

命令