问题现象:
hadoop-vfs挂载目录显示乱码,且list目录时出现input/output error.
-rw-r--r-- 1 ***** ***** 13366 2010-02-19 08:55 ********.txt
drwxr-xr-x 3 ***** **** 4096 2011-06-07 15:32 logs
d????????? ? ? ? ? ? mnt
-rw-r--r-- 1 ***** ***** 101 2010-02-19 08:55 ********.txt
-rw-r--r-- 1 ***** ***** 1366 2010-02-19 08:55 *******.txt
解决方法:
./fuse_dfs_wrapper.sh dfs://192.168.100.201:54310 /home/data -o rw,nonempty,allow_other,usetrash,default_permissions -d
改成
./fuse_dfs_wrapper.sh dfs://internal-node0:54310 /home/data -o rw,nonempty,allow_other,usetrash,default_permissions -d
参考文档:
FUSE-DFS is extremely picky about hostnames. All of the following should have the exact same string:
- Output of "hostname" on the namenode.
- fs.default.name
- Primary reverse-DNS of the namenode's IP.
"localhost" is almost certainly not what you want.