我刚刚安装了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)
2条答案
按热度按时间gojuced71#
我相信你要找的命令是:
hdfs dfs -copyFromLocal in /in
sdnqo3pr2#
尝试,
从本地复制
用法:
hadoop fs -copyFromLocal <localsrc> URI
前任:hadoop$ bin/hadoop fs -copyFromLocal in /in
与put命令类似,只是源代码仅限于本地文件引用。