Hairong Kuang wrote:

If you have a Jobconf called xxJob, you can set the key/value types for the
map phase as follows:
xxJob.setInputFormat(SequenceFileInputFormat.class);
xxJob.setInputKeyClass(UTF8.class);
xxJob.setInputValueClass(ArrayWritable.class);

So that's how it's supposed to work. Could I suggest more intuitive setMap/ReduceKey/ValueClass methods?

However it still doesn't work, maybe because in MapTask.run the Writer is constructed with Output classnames:

         new SequenceFile.Writer(FileSystem.getNamed("local", job),
this.mapOutputFile.getOutputFile(getTaskId(), i).toString(),
                                 job.getOutputKeyClass(),
                                 job.getOutputValueClass());

Is this the way it ought to be?


Reply via email to