You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Scott Carey (JIRA)" <ji...@apache.org> on 2010/05/19 01:34:53 UTC
[jira] Commented: (AVRO-545) Move mapreduce bindings out of avro
jar
[ https://issues.apache.org/jira/browse/AVRO-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868901#action_12868901 ]
Scott Carey commented on AVRO-545:
----------------------------------
The mapreduce dependency in Avro is specified as "optional", which means that consumers of avro do not automatically pull it in as a dependency. In other words, its not a transitive dependency.
We can move it to another jar "avro-mapred.jar", but there is only a KB or two difference in jar size at the moment.
{code}
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>0.20.2</version>
<optional>true</optional>
</dependency>
{code}
In short, if Hadoop 0.22 depends on Avro 1.4, it does not imply that Hadoop 0.22 depends on Hadoop 0.20.2 due to the above "optional" flag.
http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html
>From the maven site:
{quote}
How do optional dependencies work?
Project-A -> Project-B
The diagram above says that Project-A depends on Project-B. When A declares B as an optional dependency in its POM, this relationship remains unchanged. Its just like a normal build where Project-B will be added in its classpath.
Project-X -> Project-A
But when another project(Project-X) declares Project-A as a dependency in its POM, the optional dependency takes effect. You'll notice that Project-B is not included in the classpath of Project-X; you will need to declare it directly in your POM in order for B to be included in X's classpath.
{quote}
> Move mapreduce bindings out of avro jar
> ---------------------------------------
>
> Key: AVRO-545
> URL: https://issues.apache.org/jira/browse/AVRO-545
> Project: Avro
> Issue Type: Bug
> Components: java
> Reporter: Owen O'Malley
>
> MapReduce should not depend on any jars (eg. avro's main jar) that also depend on the MapReduce jar.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.