When I configure my job to use a KeyValueTextInputFormat doesn't that
imply that the key and value to my mapper will be both Text?
I have it set up like this and I am using the default Mapper.class ie
IdentityMapper
- KeyValueTextInputFormat.addInputPath(job, new Path(otherArgs[0]));
but I keep receiving this error:
- java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot
be cast to org.apache.hadoop.io.Text
I would expect this error if I was using the FileInputFormat because
that return the key as a LongWritable and the value as Text but I am
unsure of why its happening here.
Also on the same note, when I supply FileInputFormat or
KeyValueTextInputFormat does that implicitly set
job.setMapOutputKeyClass and job.setMapOutputValueClass. When are these
used?
Thanks for the clarification