我遵循这个教程。
http://hadoop.apache.org/docs/r2.4.0/hadoop-project-dist/hadoop-common/singlecluster.html#pseudo-分布式操作
我到了这一点,开始了节点。
Start NameNode daemon and DataNode daemon:
$ sbin/start-dfs.sh
但是当我运行接下来的步骤时,看起来好像没有数据节点在运行(因为这样说会出错)。
为什么数据节点关闭?我该怎么解决这个问题?
这是我的数据节点的日志。
hduser@test02:/usr/local/hadoop$ jps
3792 SecondaryNameNode
3929 Jps
3258 NameNode
hduser@test02:/usr/local/hadoop$ cat /usr/local/hadoop/logs/hadoop-hduser-datanode-test02.out
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
-m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 3781
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
hduser@test02:/usr/local/hadoop$
编辑:好像我把这个端口号弄错了。 <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property>
现在,当我做对了(即等于9000)时,我没有启动名称节点。
hduser@test02:/usr/local/hadoop$ jps
10423 DataNode
10938 Jps
10703 SecondaryNameNode
我无法浏览: http://my-server-name:50070/
再。
希望这能给你一些提示。
我完全是hadoop的初学者,现在有点迷路了。
[core-site.xml]
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/var/lib/hadoop/tmp</value>
<description>A base for other temporary directories.</description>
</property>
</configuration>
[hdfs-site.xml]
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
<description>Default block replication.
The actual number of replications can be specified when the file is created.
The default is used if replication is not specified in create time.
</description>
</property>
</configuration>
在mapred-site.xml中我什么都没有。
4条答案
按热度按时间7jmck4yq1#
可能您的从属数据主数据没有同步,请删除./hadoop/hdfs中的data&name文件夹并重新创建它们。重新格式化namenode。而不是启动dfs。
cs7cruho2#
添加以下配置conf/core-site.xml
conf/mapred-site.xml文件
conf/hdfs-site.xml文件
停止hadoop
更改权限并删除临时目录数据
格式名称节点
wsewodh23#
经过一天的努力,我刚刚删除了2.4版并安装了hadoop2.2(因为我意识到2.2是最新的稳定版本)。然后,我得到了所有的工作都遵循这个不错的教程。
http://codesfusion.blogspot.com/2013/10/setup-hadoop-2x-220-on-ubuntu.html?m=1
我正在读的关于2.4的文档有些不对劲。
不要说它不适合初学者,通常是初学者偶然发现的。
x9ybnkn64#
1.首先停止所有实体,如namenode、datanode等(您将有一些脚本或命令来执行此操作)
格式化tmp目录
去
/var/cache/hadoop-hdfs/hdfs/dfs/
手动删除目录中的所有内容现在再次格式化namenode
启动所有实体,然后使用jps命令确认datanode已经启动
现在运行任何您喜欢或拥有的应用程序。
希望这有帮助。