赞
踩
最近出现的一次HDFS报错问题,查看一个文件是报错Couldn't preview the file.
配置文件hdfs-site.xml配置有误
windows下的C:\Windows\System32\drivers\etc\hosts 与 linux下的etc/hosts下的hadoop映射地址不一致
在hdfs-site.xml配置如下依赖
- <property>
- <name>dfs.webhdfs.enabled</name>
- <value>true</value>
- </property>
修改windows下的C:\Windows\System32\drivers\etc\hosts 文件与linux下的etc/hosts下的hadoop 映射地址保持一致
我的是
C:\Windows\System32\drivers\etc\hosts
- 192.168.137.121 hadoop121.hadoop.com hadoop121
- 192.168.137.122 hadoop122.hadoop.com hadoop122
- 192.168.137.123 hadoop123.hadoop.com hadoop123
etc/hosts
- 192.168.137.121 hadoop121.hadoop.com hadoop121
- 192.168.137.122 hadoop122.hadoop.com hadoop122
- 192.168.137.123 hadoop123.hadoop.com hadoop123
解决完成:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。