Hi All,

I am using avro 15.3 and CDH3. I have a query in running a Non Avro to Avro
Job. My mapper is non Avro mapper and it outputs a avro data.
When I run this, I get an error saying not a Pair Schema. Does the key
always have to be a Pair Schema?

public void map(Text key, Text value,
                OutputCollector<AvroWrapper<TestPair>, NullWritable> output,
                Reporter reporter) throws IOException {
            String valueString = value.toString();
            String[] toks = valueString.split("\t");
            TestPair p = new TestPair();
            p.left = toks[0];
            p.right = toks[1];


            output.collect(new AvroWrapper<TestPair>(p),wt);
        }

 Thanks,
-Rohini

Reply via email to