我在这里使用hdp2.0-hadoop2.2.0和apacheavro1.7.4以及下面的avromapreduce指南来获得一个新的m/rapi
我有以下错误
2014-07-15 05:46:04,354 FATAL [main] org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
at org.apache.avro.mapreduce.AvroKeyInputFormat.createRecordReader(AvroKeyInputFormat.java:47)
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)
似乎我在混合新旧api。你猜呢?谢谢
2条答案
按热度按时间lsmd5eda1#
实际上找到了解决问题的方法。这里正式报道
简单的解决方案-avro需要根据hadoop2编译
kuarbcqp2#
对我来说,我通过添加
classifier:"hapdoop2"
给我们的build.gradle
文件: