Hadoop Problem : hadoop0.20.2中的KeyValueTextInputFormat

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。除非自己去寫了。

發佈了95 篇原創文章 · 獲贊 36 · 訪問量 31萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章