Hadoop で WordCount の例を実行していて、ファイルの内容全体を読みたいと思っています。ここの例(WholeFileInputFormat-NewAPI.java および WholeFileRecordReader-NewAPI.java) を使用しました。WordCount クラスにこれを追加しました: conf.setInputFormat(WholeFileInputFormat.class);
プログラムをコンパイルすると、次のエラーが表示されます。
error: method setInputFormat in class JobConf cannot be applied to given types;
conf.setInputFormat(WholeFileInputFormat.class);
^
required: Class<? extends InputFormat>
found: Class<WholeFileInputFormat>
reason: argument mismatch; Class<WholeFileInputFormat> cannot be converted to Class<? extends InputFormat>
ご協力いただきありがとうございます。