下面是我在编译这个wordcount.java文件时遇到的错误。
$javac -classpath /usr/lib/hadoop/hadoop-common-2.0.0-cdh4.0.1.jar:/usr/lib/hadoop/client/hadoop-mapreduce-client-core-2.0.0-cdh4.0.1.jar -d ~/wordcount /usr/lib/hadoop/wordcount_classes/WordCount.java
/usr/lib/hadoop/hadoop-common-2.0.0-cdh4.0.1.jar(org/apache/hadoop/fs/Path.class):
warning: Cannot find annotation method 'value()' in type 'LimitedPrivate': class file for org.apache.hadoop.classification.InterfaceAudience not found
1 warning
5条答案
按热度按时间new9mtju1#
解决此问题的步骤:
我创建了一个名为wordcount的目录(
/home/cloudera/wordcount
).补充
WordCount.java
至/home/cloudera/wordcount
目录。在目录中,我运行了以下命令:
3z6pesqy2#
hadoop-2.6.x中的fast(但不建议用于生产)是
unix/macos系统
wwodge7n3#
对于hadoop版本2.6.0,您需要添加以下JAR:
javac-classpath$hadoop\u home/share/hadoop/common/hadoop-common-2.6.0.jar:$hadoop\u home/share/hadoop/common/lib/hadoop-annotations-2.6.0.jar:$hadoop\u home/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.6.0.jar/path\u到您的\u java\u文件/wordcount.java
pbwdgjma4#
注解pom中的以下依赖项(如果有的话)
然后启用hadoop注解
but5z9lq5#
将hadoop-annotations-2.0.0-cdh4.0.1.jar添加到类路径