我面临一个奇怪的问题,我无法在我的hdfs中看到文件.每当我做一个hadoop fs -ls我得到以下错误:
hadoop fs -ls
Warning: $HADOOP_HOME is deprecated.
ls: Cannot access .: No such file or directory.
Run Code Online (Sandbox Code Playgroud)
我可以使用像copyfromlocal等命令但仍然无法在hdfs中看到它们也因为这个问题而无法运行猪脚本.如果我做了一个hadoop fs -ls/*我得到以下错误:
hadoop fs -ls /*
Warning: $HADOOP_HOME is deprecated.
Found 1 items
drwxr-xr-x - hduser hadoop 0 2014-02-14 16:49 /app/hadoop
ls: Cannot access /bin: No such file or directory.
ls: Cannot access /boot: No such file or directory.
ls: Cannot access /Data: No such file or directory.
ls: Cannot access /dev: No such file or directory.
ls: Cannot access /etc: No such file or directory.
Found 1 items
drwxr-xr-x - hduser hadoop 0 2014-02-19 13:02 /home/hduser
ls: Cannot access /lib: No such file or directory.
ls: Cannot access /lib64: No such file or directory.
ls: Cannot access /lost+found: No such file or directory.
ls: Cannot access /media: No such file or directory.
ls: Cannot access /misc: No such file or directory.
ls: Cannot access /mnt: No such file or directory.
ls: Cannot access /net: No such file or directory.
ls: Cannot access /opt: No such file or directory.
ls: Cannot access /proc: No such file or directory.
ls: Cannot access /root: No such file or directory.
ls: Cannot access /sbin: No such file or directory.
ls: Cannot access /selinux: No such file or directory.
ls: Cannot access /srv: No such file or directory.
ls: Cannot access /sys: No such file or directory.
ls: Cannot access /tftpboot: No such file or directory.
ls: Cannot access /usr: No such file or directory.
ls: Cannot access /var: No such file or directory.
ls: Cannot access /zookeeper.out: No such file or directory.
ls: Cannot access /zookeeper_server.pid: No such file or directory.
Run Code Online (Sandbox Code Playgroud)
谁能告诉我这里可能出现的问题?我有一个7节点hadoop集群,工作正常.我只在2天左右才遇到这个问题.尝试重启集群,重启节点等但仍面临同样的问题.
谢谢,
你的hadoop没有问题
hadoop fs -ls
Run Code Online (Sandbox Code Playgroud)
没有显示任何输出,因为当前用户的主目录中没有目录或文件(从中执行命令)
请运行第二个命令
hadoop fs -ls /
Run Code Online (Sandbox Code Playgroud)
代替
hadoop fs -ls /*
Run Code Online (Sandbox Code Playgroud)
这将工作正常,将为您提供正确的输出.
| 归档时间: |
|
| 查看次数: |
6174 次 |
| 最近记录: |