`hadoop dfs`命令java.lang.NoClassDefFoundError:org / apache / hadoop / fs / FsShell

时间:2016-04-09 19:36:53

标签: java hadoop hdfs hadoop2 dfs

我正在尝试使用hadoop dfs

cygwin上运行Hadoop - 2.6.3命令

我正在运行以下命令

/cygdrive/c/hadoop-2.6.4/bin/hadoop dfs -put word1 words/最终会抛出错误

java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FsShell
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FsShell
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.hadoop.fs.FsShell.  Program will exit.
Exception in thread "main"

我正确设置路径

  $ echo $JAVA_HOME
C:\Program Files\Java\jdk1.6.0_31

$ echo $HADOOP_HOME
/cygdrive/c/hadoop-2.6.4/

有人可以帮我吗?

我还尝试从hadoop-env.sh运行$HADOOP_HOME/etc/hadoop文件,但徒劳无功

0 个答案:

没有答案