I am working on some MapR programs. They are usually coded and tested on Apache hadoop on my local machine,
and packaged jar (with dependencies) is uploaded onto our cluster running Cloudera CDH4 (v4.4.1). For both situation, I have different pom.xml files to make packages.
Now I am using Apache Avro to serialize data and current stable version 1.7.5 is involved.
In local mode, I have avro-mapred pom.xml dependency
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro-mapred</artifactId>
<version>1.7.5</version>
</dependency>
and it works well on Apache hadoop.
In cluster mode, for the pom.xml dependency,
a classifier tag is appended as suggested by CDH4 doc:
<classifier>hadoop1</classifier>
But with neither hadoop1 or hadoop2, error occurs.
For hadoop1 tag:
Error running child : java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
at org.apache.avro.mapreduce.AvroKeyOutputFormat.getRecordWriter(AvroKeyOutputFormat.java:87)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:597)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:444)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
For hadoop2 tag,
Error running child : java.lang.NoSuchMethodError: org.apache.avro.generic.GenericData.createDatumWriter(Lorg/apache/avro/Schema;)Lorg/apache/avro/io/DatumWriter;
at org.apache.avro.mapreduce.AvroKeyRecordWriter.<init>(AvroKeyRecordWriter.java:53)
at org.apache.avro.mapreduce.AvroKeyOutputFormat$RecordWriterFactory.create(AvroKeyOutputFormat.java:78)
at org.apache.avro.mapreduce.AvroKeyOutputFormat.getRecordWriter(AvroKeyOutputFormat.java:104)
at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:597)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:444)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
I am programming using new mapreduce interface in MapR1.
I also guess its a conflict with the installed avro version and further contact with our cluster admin
will be reached.
Any ideas, guys?
Jamin