我是 hadoop 的初学者,使用 hadoop 的初学者指南作为教程。
我正在使用 mac osx 10.9.2 和 hadoop 版本 1.2.1
当我在终端中调用 echo $PATH 时,我已经设置了所有适当的类路径:
这是我得到的结果:
/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/oladotunopasina/hadoop-1.2.1/hadoop-core-1.2.1.jar:/Users/oladotunopasina/hadoop-1.2.1/bin:/ usr/share/grails/bin:/usr/share/groovy/bin:/Users/oladotunopasina/.rvm/gems/ruby-2.1.1/bin:/Users/oladotunopasina/.rvm/gems/ruby-2.1.1 @global/bin:/Users/oladotunopasina/.rvm/rubies/ruby-2.1.1/bin:/usr/local/heroku/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr /local/bin:/Users/oladotunopasina/.rvm/bin:/Users/oladotunopasina/.rvm/bin
我尝试编译 WordCount1.java,但出现以下错误:
WordCount1.java:2: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.Configuration ;
^
WordCount1.java:3: package org.apache.hadoop.fs does not exist
import org.apache.hadoop.fs.Path;
^
WordCount1.java:4: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.IntWritable;
^
WordCount1.java:5: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.Text;
^
WordCount1.java:6: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Job;
^
WordCount1.java:7: package org.apache.hadoop.mapreduce does not exist
import org.apache.hadoop.mapreduce.Mapper;
^
请帮忙。