hadoop wordcount示例java.lang.noclassdeffounderror:hdfs错误

q3qa4bjr  于 2021-06-03  发布在  Hadoop
关注(0)|答案(2)|浏览(334)

我刚刚安装了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)
gojuced7

gojuced71#

我相信你要找的命令是: hdfs dfs -copyFromLocal in /in

sdnqo3pr

sdnqo3pr2#

尝试,
从本地复制
用法: hadoop fs -copyFromLocal <localsrc> URI 前任: hadoop$ bin/hadoop fs -copyFromLocal in /in 与put命令类似,只是源代码仅限于本地文件引用。

相关问题