FAQ
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

Search Discussions

  • Edward Capriolo at Feb 25, 2010 at 3:30 pm

    On Wed, Feb 24, 2010 at 3:30 PM, Larry Homes 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 :)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedFeb 24, '10 at 8:31p
activeFeb 25, '10 at 3:30p
posts2
users2
websitehadoop.apache.org...
irc#hadoop

2 users in discussion

Edward Capriolo: 1 post Larry Homes: 1 post

People

Translate

site design / logo © 2022 Grokbase