我刚刚安装了Hadoop-2.2.0。我尝试了“>这个链接的WordCount示例,但是我收到了这个错误。我该如何解决?
hadoop$ bin/hadoop hdfs -copyFromLocal in /in
Exception in thread "main" java.lang.NoClassDefFoundError: hdfs
Caused by: java.lang.ClassNotFoundException: hdfs
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)
答案 0 :(得分:1)
我相信你要找的命令是:
hdfs dfs -copyFromLocal in /in
答案 1 :(得分:0)
尝试,
<强> copyFromLocal 强>
用法: hadoop fs -copyFromLocal <localsrc> URI
例如: hadoop$ bin/hadoop fs -copyFromLocal in /in
与put命令类似,但源仅限于本地文件引用。