命令"hadoop fs -ls ."不起作用



我想我已经正确安装了hadoop。如果我执行jps,我可以看到namenode和datanode,没有问题。

当我输入hadoop fs -ls .时,我得到错误:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/db/hadoop-2.4.1/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'.
14/08/08 12:42:44 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
ls: '.': No such file or directory

当我输入hadoop dfs -ls .时,我得到错误:

DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /opt/db/hadoop-2.4.1/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'.
14/08/08 12:43:27 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
ls: '.': No such file or directory

当我输入hadoop hdfs -ls .时,我得到错误:

Error: Could not find or load main class hdfs

不管我是否放了'。'或'/'或我所在的任何目录

这是什么意思?我怎样才能得到正常的、预期的输出?我错过了什么?

使用

hdfs dfs -ls ...

我不认为有hadoop hdfs这种东西

按如下方式使用命令

bin/hadoop fs -ls /