hadoop-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Something Something <mailinglist...@gmail.com>
Subject Type mismatch in key from map
Date Thu, 24 Dec 2009 00:22:17 GMT
I would like to feed a file created by one job as an input to the next job.
 When I do that, I get:

java.io.IOException: Type mismatch in key from map: expected
org.apache.hadoop.io.Text, recieved org.apache.hadoop.io.LongWritable
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:583)
 at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)

The first job does:  context.write(key, value) - in a loop.  This creates a
file (<output dir>/part-r-00000) that contains something like this...

1 1,2,4*6*,1**
1 2,2,6*,4**
2 1,6,2*3*5*6*7*8*,1**
2 2,6,3*5*6*7*8*,2**
& so on...

Now in my second job I do:

FileInputFormat.addInputPath(job, new Path(inFile));

Where inFile is set to the one created above (<output dir>/part-r-00000)

What am I doing wrong?  Please help.  Thanks.

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