命令“hadoop fs -ls。”不起作用

时间:2014-08-08 10:46:14

标签: hadoop hdfs

我想我已正确安装了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

这不管我是否放了&#39;。&#39;或者&#39; /&#39;或者我在的任何目录。

这一切意味着什么?如何获得正常的预期输出?我错过了什么?

2 个答案:

答案 0 :(得分:2)

使用

hdfs dfs -ls ...

我认为不存在hadoop hdfs

这样的事情

答案 1 :(得分:-2)

使用以下命令

bin/hadoop fs -ls /