0

我正在尝试使用 Hadoop 2.2.0 在 Mahout 1.0-SNAPSHOT 中运行 seqdirectory 命令。关于使用命令:

seqdirectory -i input -o output

堆栈跟踪:

Error: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader.initNextRecordReader(CombineFileRecordReader.java:164)
    at org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader.<init>(CombineFileRecordReader.java:126)
    at org.apache.mahout.text.MultipleTextFileInputFormat.createRecordReader(MultipleTextFileInputFormat.java:43)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.<init>(MapTask.java:491)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:734)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:339)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.mapreduce.lib.input.CombineFileRecordReader.initNextRecordReader(CombineFileRecordReader.java:155)
    ... 10 more
Caused by: java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
    at org.apache.mahout.text.WholeFileRecordReader.<init>(WholeFileRecordReader.java:59)
    ... 15 more

我认为这是 Mahout 0.9 中的一个问题,并已在后备箱中修复。任何线索如何处理这个?我想在 MapReduce 模式下运行它,所以 -xm 顺序不是我正在寻找的答案。

4

1 回答 1

1

Caused by: java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected

像这样的错误总是意味着您正在针对与编译它的版本不同的版本运行某些东西。在这里,您没有为 Hadoop 2 编译 Mahout。如果没有一些构建更改,它本质上不能与 Hadoop 2 一起使用。

于 2014-04-12T23:48:37.253 回答