我試圖運行WordCount example。但是我正在編譯程序時遇到問題。無法執行基本的Hadoop Mapreduce Wordcount示例
我得到的錯誤:
error: package org.apache.hadoop.mapred does not exist
執行後:
javac -classpath /usr/local/hadoop/share/hadoop/common/hadoop-common-2.7.3.jar -d wordcount_classes WordCount.java
我成立了Hadoop的使用這個tutorial。 我也看了這個在stackoverflow:question並在/usr/local/hadoop
執行bin/hadoop classpath
命令。這是我得到的輸出:
/usr/local/hadoop/etc/hadoop:/usr/local/hadoop/share/hadoop/common/lib/* :/usr/local/hadoop/share/hadoop/common/* :/usr/local/hadoop/share/hadoop/hdfs:/usr/local/hadoop/share/hadoop/hdfs/lib/* :/usr/local/hadoop/share/hadoop/hdfs/* :/usr/local/hadoop/share/hadoop/yarn/lib/* :/usr/local/hadoop/share/hadoop/yarn/* :/usr/local/hadoop/share/hadoop/mapreduce/lib/* :/usr/local/hadoop/share/hadoop/mapreduce/* :/contrib/capacity-scheduler/*.jar
但我不知道該怎麼做,或者我的下一步應該是什麼!請幫忙!