On Wed, Feb 24, 2010 at 3:30 PM, Larry Homes <[email protected]> wrote:
> Hello,
>
> I am trying to sort some values by using a simple map and reduce
> without any processing, but I think I messed up my data types somehow.
>
> Rather than try to paste code in an email, I have described the
> problem and pasted all the code (nicely formatted) here:
> http://www.coderanch.com/t/484435/Distributed-Java/java/Hadoop-key-mismatch
>
> Thanks
>

I think the first problem you are having is that you changed the
signature of the map method incorrectly.

 public void map(Text key, Text value, Context context)

The type of key should be LongWritable. Key is an integer representing
the offset of the line. Value is the entire line of text.

Try :
public void map(LongWritable key, Text value, Context context)

Adjust accordingly and you should be ok. (at least until the next problem :)

Reply via email to