您的位置:首页 > 产品设计 > UI/UE

Hadoop Problem : hadoop0.20.2中的KeyValueTextInputFormat

2014-09-19 13:28 148 查看
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。除非自己去写了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: