[ 
https://issues.apache.org/jira/browse/AVRO-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom White updated AVRO-1170:
----------------------------

    Attachment: AVRO-1170.patch

There was a mistake in the package name which I've now fixed 
(org.apache.hadoop.mapreduce.TaskAttemptContext). I've also added a profile 
that matches when you specify '-Dhadoop.version=1', since in the previous patch 
this caused neither the hadoop1 nor the hadoop2 profile to match, which caused 
a compilation error.

You need to do a 'mvn clean' before running the tests for a different Hadoop 
version, otherwise the classes are not recompiled against the new Hadoop 
classes and you get an IncompatibleClassChangeError. Thus:

{noformat}
mvn clean test -Dtest=TestAvroMultipleOutputs -Dhadoop.version=1
mvn clean test -Dtest=TestAvroMultipleOutputs -Dhadoop.version=2
{noformat}
                
> Avro's new mapreduce APIs don't work with Hadoop 2
> --------------------------------------------------
>
>                 Key: AVRO-1170
>                 URL: https://issues.apache.org/jira/browse/AVRO-1170
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.7.1
>            Reporter: Tom White
>            Assignee: Tom White
>         Attachments: AVRO-1170.patch, AVRO-1170.patch, AVRO-1170.patch, 
> AVRO-1170.patch
>
>
> Avro does not compile against Hadoop since some interfaces were changed to 
> classes between Hadoop 1 and 2 (e.g. TaskAttemptContext).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to