2008-06-21 20:30:18,928 WARN org.apache.hadoop.mapred.TaskTracker: Error running child java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.LongWritable, recieved org.apache.hadoop.io.Text at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:419)
at com.compspy.mapred.RecordImport$MapClass.map(RecordImport.java:96)
at com.compspy.mapred.RecordImport$MapClass.map(RecordImport.java:1)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:219)
at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2124)

I am trying to run a MR job to take a file made with php as an import I have the lines formated like this

Number\tText\r\n

So each row has a line number from 0 - X a tab then the Text then a \r\n for a newline for each record I do not need the line number but been getting errors like above so I reformated my file so it would have one trying to get this to work

Is there somethign I am missing should there be "" around the text or <> around the numbers etc..?

The Text is going to be used to make Hbase updates/inserts in the reduce so I want to output Text,RowResults If I do not get the type mismatch I get a casting error when I have tryed different things
I can reformat my input file if need to just need to get my mapper to work.
How can I input my file in to a MR job?
my mapper below I am trying to use

 public static class MapClass extends MapReduceBase
  implements Mapper<LongWritable, Text, Text, RowResult> {

   public void map(LongWritable key, Text value,
                   OutputCollector<Text, RowResult> output,
                   Reporter reporter) throws IOException {

   // do some work here to get the below items from the input

     output.collect(rowkey, newvals);
   }
 }


Reply via email to