我正在尝试使用Hadoop 2.2上的mahout 0.9库执行mapreduce作业以进行XML解析。
但我得到了以下错误:
14/02/24 16:03:02 INFO mapreduce.Job: Task Id : attempt_1393235568433_0004_m_000000_0, Status : FAILED
Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
14/02/24 16:03:12 INFO mapreduce.Job: Task Id : attempt_1393235568433_0004_m_000000_1, Status : FAILED
Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
14/02/24 16:03:31 INFO mapreduce.Job: Task Id : attempt_1393235568433_0004_m_000000_2, Status : FAILED
Error: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
14/02/24 16:03:53 INFO mapreduce.Job: map 100% reduce 100%
14/02/24 16:03:53 INFO mapreduce.Job: Job job_1393235568433_0004 failed with state FAILED due to: Task failed task_1393235568433_0004_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0
我尝试搜索解决方案,但获得了链接http://osdir.com/ml/general/2014-02/msg39414.html,其中指出Hadoop 2.2不支持Mahout 0.8或0.9。
任何可能的工作方式?
答案 0 :(得分:1)
大约一小时前,Mahout正式在主分支中添加了对Hadoop 2.x的支持(参见MAHOUT-1329)
在此处查看代码https://github.com/apache/mahout并使用以下方法重新编译:
mvn clean package -Dhadoop2.version=2.2.0
试试看是否有效。