Did you create your input file using a SequenceFile.Writer?

Hairong 

-----Original Message-----
From: Teppo Kurki [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 29, 2006 12:33 PM
To: [email protected]
Subject: Re: Different Key/Value classes for Map and Reduce?

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