On 04/27/2011 02:54 PM, Markus Weimer wrote: > I am trying to read some data in Text format and produce avro files in the > reducers. The documentation says that I should implement mapper with AvroKey > and AvroValue as the output. I did that, but get the following error: > >> java.lang.IllegalArgumentException: Not a Pair schema: > > Am I supposed to make the AvroValue a Pair schema? Or do I need to call > > AvroJob.setMapOutputSchema(jobConf, schema); > > in my job setup? If so, would I create a schema that is a Pair of what I use > as key and value?
Yes, you need to use a Pair schema in this case. Relevant examples are in TestSequenceFileReader.java (http://s.apache.org/GXm). See in particular the testNonAvroMapper method in that class. If you feel the documentation is incomplete here, please file an issue in Jira. Thanks! Doug
