Hadoop Problem : hadoop0.20.2中的KeyValueTextInputFormat

来源:互联网 发布:qq群排名软件 编辑:程序博客网 时间:2024/06/10 23:03

from:http://blog.csdn.net/yutinghao/article/details/22868767


今天想用数据输入格式KeyValueInputFormat,API文档上的方法,我使用job.setInputFormatClass(KeyValueTextInputFormat.class);结果却报错The method setInputFormatClass(Class<? extends InputFormat>) in the type Job is not applicable for the arguments (Class<KeyValueTextInputFormat>)

我重新看了下API文档,确定这种写法应该是没问题的,可是怎么报错了呢?然后我google了相关内容,终于找到了原因。

http://lucene.472066.n3.nabble.com/No-KeyValueTextInputFormat-in-hadoop-0-20-2-td894459.html

对于这个问题,大家在这个链接里进行了讨论,结果是The new api KeyValueTextInputFormat is not available in branch 0.20. It is added in branch 0.21 through https://issues.apache.org/jira/browse/MAPREDUCE-655.


好吧,也就是在这个版本不能使用KeyValueInputFormat。除非自己去写了。

0 0
原创粉丝点击