You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Zhenyu Zhong <zh...@gmail.com> on 2010/05/04 22:22:17 UTC
about CombineFileInputFormat
Hi,
I tried to use CombineFileInputFormat in 0.20.2. It seems I need to extend
it because it is an abstract class.
However, I need to implement getRecordReader method in the extended class.
May I ask how to implement this getRecordReader method?
I tried to do something like this:
public RecordReader getRecordReader(InputSplit genericSplit, JobConf job,
Reporter reporter) throws IOException {
// TODO Auto-generated method stub
reporter.setStatus(genericSplit.toString());
return new CombineFileRecordReader(job, (CombineFileSplit) genericSplit,
reporter, CombineFileRecordReader.class);
}
It doesn't seem to be working. I would be very appreciated if someone can
shed a light on this.
thanks
zhenyu
Re: about CombineFileInputFormat
Posted by Amareshwari Sri Ramadasu <am...@yahoo-inc.com>.
See patch on https://issues.apache.org/jira/browse/MAPREDUCE-364 as an example.
-Amareshwari
On 5/5/10 1:52 AM, "Zhenyu Zhong" <zh...@gmail.com> wrote:
Hi,
I tried to use CombineFileInputFormat in 0.20.2. It seems I need to extend
it because it is an abstract class.
However, I need to implement getRecordReader method in the extended class.
May I ask how to implement this getRecordReader method?
I tried to do something like this:
public RecordReader getRecordReader(InputSplit genericSplit, JobConf job,
Reporter reporter) throws IOException {
// TODO Auto-generated method stub
reporter.setStatus(genericSplit.toString());
return new CombineFileRecordReader(job, (CombineFileSplit) genericSplit,
reporter, CombineFileRecordReader.class);
}
It doesn't seem to be working. I would be very appreciated if someone can
shed a light on this.
thanks
zhenyu