Skip to content

Commit 8586bf5

Browse files
srowenpwendell
authored andcommitted
SPARK-1802. Audit dependency graph when Spark is built with -Phive
This initial commit resolves the conflicts in the Hive profiles as noted in https://issues.apache.org/jira/browse/SPARK-1802 . Most of the fix was to note that Hive drags in Avro, and so if the hive module depends on Spark's version of the `avro-*` dependencies, it will pull in our exclusions as needed too. But I found we need to copy some exclusions between the two Avro dependencies to get this right. And then had to squash some commons-logging intrusions. This turned up another annoying find, that `hive-exec` is basically an "assembly" artifact that _also_ packages all of its transitive dependencies. This means the final assembly shows lots of collisions between itself and its dependencies, and even other project dependencies. I have a TODO to examine whether that is going to be a deal-breaker or not. In the meantime I'm going to tack on a second commit to this PR that will also fix some similar, last collisions in the YARN profile. Author: Sean Owen <[email protected]> Closes apache#744 from srowen/SPARK-1802 and squashes the following commits: a856604 [Sean Owen] Resolve JAR version conflicts specific to Hive profile
1 parent 7120a29 commit 8586bf5

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,22 @@
535535
<groupId>io.netty</groupId>
536536
<artifactId>netty</artifactId>
537537
</exclusion>
538+
<exclusion>
539+
<groupId>org.mortbay.jetty</groupId>
540+
<artifactId>jetty</artifactId>
541+
</exclusion>
542+
<exclusion>
543+
<groupId>org.mortbay.jetty</groupId>
544+
<artifactId>jetty-util</artifactId>
545+
</exclusion>
546+
<exclusion>
547+
<groupId>org.mortbay.jetty</groupId>
548+
<artifactId>servlet-api</artifactId>
549+
</exclusion>
550+
<exclusion>
551+
<groupId>org.apache.velocity</groupId>
552+
<artifactId>velocity</artifactId>
553+
</exclusion>
538554
</exclusions>
539555
</dependency>
540556
<!-- See SPARK-1556 for info on this dependency: -->

sql/hive/pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
<groupId>org.apache.hive</groupId>
5353
<artifactId>hive-exec</artifactId>
5454
<version>${hive.version}</version>
55+
<exclusions>
56+
<exclusion>
57+
<groupId>commons-logging</groupId>
58+
<artifactId>commons-logging</artifactId>
59+
</exclusion>
60+
</exclusions>
5561
</dependency>
5662
<dependency>
5763
<groupId>org.codehaus.jackson</groupId>
@@ -61,6 +67,21 @@
6167
<groupId>org.apache.hive</groupId>
6268
<artifactId>hive-serde</artifactId>
6369
<version>${hive.version}</version>
70+
<exclusions>
71+
<exclusion>
72+
<groupId>commons-logging</groupId>
73+
<artifactId>commons-logging</artifactId>
74+
</exclusion>
75+
<exclusion>
76+
<groupId>commons-logging</groupId>
77+
<artifactId>commons-logging-api</artifactId>
78+
</exclusion>
79+
</exclusions>
80+
</dependency>
81+
<!-- hive-serde already depends on avro, but this brings in customized config of avro deps from parent -->
82+
<dependency>
83+
<groupId>org.apache.avro</groupId>
84+
<artifactId>avro</artifactId>
6485
</dependency>
6586
<dependency>
6687
<groupId>org.scalatest</groupId>

0 commit comments

Comments
 (0)