hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harit Himanshu <harit.himan...@gmail.com>
Subject Re: java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.LongWritable, recieved org.apache.hadoop.io.Text
Date Fri, 03 Aug 2012 17:19:52 GMT
This works perfectly :)

Thank you Bejoy!

On Thu, Aug 2, 2012 at 4:07 PM, Bejoy Ks <bejoy.hadoop@gmail.com> wrote:

> Hi Harit
>
> You need to set the Key Type as well. If you are using different Data Type
> for Key and Values in your map output with respect to reduce output then
> you need to specify both.
>
>  //setting the map output data type classes
>             job.setMapOutputKeyClass(LongWritable.class);
>             job.setMapOutputValueClass(Text.class);
>
>  //setting the final reduce output data type classes
>             job.setOutputKeyClass(Text.class);
>             job.setOutputValueClass(IntWritable.class);
>
> Regards
> Bejoy KS
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message