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 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


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);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
postedJun 22, '08 at 1:47a
activeJun 22, '08 at 1:47a

1 user in discussion

Billy Pearson: 1 post



site design / logo © 2022 Grokbase