Hi Pedro,
This is interesting.  Which version of Hadoop are you using?  And where did you 
get the example class files?  Also, are you able to reproduce it 
deterministically?
Nicholas




________________________________
From: Pedro Costa <psdc1...@gmail.com>
To: mapreduce-user@hadoop.apache.org
Sent: Wed, January 26, 2011 5:47:01 AM
Subject: PiEstimator error - Type mismatch in key from map

Hi,

I run the PI example of hadoop, and I've got the following error:

[code]
java.io.IOException: Type mismatch in key from map: expected
org.apache.hadoop.io.BooleanWritable, recieved
org.apache.hadoop.io.LongWritable
    at 
org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:885)
    at 
org.apache.hadoop.mapred.MapTask$NewOutputCollector.write(MapTask.java:551)
    at 
org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:81)

    at org.apache.hadoop.mapreduce.Mapper.map(Mapper.java:124)
    at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:637)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
    at org.apache.hadoop.mapred.Child.main(Child.java:190)
[/code]

I've look at the map function of the class "PiEstimator.class" and it seems ok.

[code]
public void map(LongWritable offset,
        LongWritable size,
        OutputCollector<BooleanWritable, LongWritable> out,
        Reporter reporter) throws IOException {}
[/code]


What's wrong with this examples?

Thanks,
-- 
Pedro

Reply via email to