Skip to content

Commit 9a48c65

Browse files
steveloughranrxin
authored andcommitted
[SPARK-13599][BUILD] remove transitive groovy dependencies from Hive
## What changes were proposed in this pull request? Modifies the dependency declarations of the all the hive artifacts, to explicitly exclude the groovy-all JAR. This stops the groovy classes *and everything else in that uber-JAR* from getting into spark-assembly JAR. ## How was this patch tested? 1. Pre-patch build was made: `mvn clean install -Pyarn,hive,hive-thriftserver` 1. spark-assembly expanded, observed to have the org.codehaus.groovy packages and JARs 1. A maven dependency tree was created `mvn dependency:tree -Pyarn,hive,hive-thriftserver -Dverbose > target/dependencies.txt` 1. This text file examined to confirm that groovy was being imported as a dependency of `org.spark-project.hive` 1. Patch applied 1. Repeated step1: clean build of project with ` -Pyarn,hive,hive-thriftserver` set 1. Examined created spark-assembly, verified no org.codehaus packages 1. Verified that the maven dependency tree no longer references groovy Note also that the size of the assembly JAR was 181628646 bytes before this patch, 166318515 after —15MB smaller. That's a good metric of things being excluded Author: Steve Loughran <[email protected]> Closes #11449 from steveloughran/fixes/SPARK-13599-groovy-dependency.
1 parent 70f6f96 commit 9a48c65

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

dev/deps/spark-deps-hadoop-2.2

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ grizzly-http-2.1.2.jar
5959
grizzly-http-server-2.1.2.jar
6060
grizzly-http-servlet-2.1.2.jar
6161
grizzly-rcm-2.1.2.jar
62-
groovy-all-2.1.6.jar
6362
guice-3.0.jar
6463
guice-servlet-3.0.jar
6564
hadoop-annotations-2.2.0.jar

dev/deps/spark-deps-hadoop-2.3

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ eigenbase-properties-1.1.5.jar
5454
geronimo-annotation_1.0_spec-1.1.1.jar
5555
geronimo-jaspic_1.0_spec-1.0.jar
5656
geronimo-jta_1.1_spec-1.1.1.jar
57-
groovy-all-2.1.6.jar
5857
guice-3.0.jar
5958
guice-servlet-3.0.jar
6059
hadoop-annotations-2.3.0.jar

dev/deps/spark-deps-hadoop-2.4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ eigenbase-properties-1.1.5.jar
5454
geronimo-annotation_1.0_spec-1.1.1.jar
5555
geronimo-jaspic_1.0_spec-1.0.jar
5656
geronimo-jta_1.1_spec-1.1.1.jar
57-
groovy-all-2.1.6.jar
5857
guice-3.0.jar
5958
guice-servlet-3.0.jar
6059
hadoop-annotations-2.4.0.jar

dev/deps/spark-deps-hadoop-2.6

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ eigenbase-properties-1.1.5.jar
5858
geronimo-annotation_1.0_spec-1.1.1.jar
5959
geronimo-jaspic_1.0_spec-1.0.jar
6060
geronimo-jta_1.1_spec-1.1.1.jar
61-
groovy-all-2.1.6.jar
6261
gson-2.2.4.jar
6362
guice-3.0.jar
6463
guice-servlet-3.0.jar

dev/deps/spark-deps-hadoop-2.7

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ eigenbase-properties-1.1.5.jar
5858
geronimo-annotation_1.0_spec-1.1.1.jar
5959
geronimo-jaspic_1.0_spec-1.0.jar
6060
geronimo-jta_1.1_spec-1.1.1.jar
61-
groovy-all-2.1.6.jar
6261
gson-2.2.4.jar
6362
guice-3.0.jar
6463
guice-servlet-3.0.jar

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,6 +1327,10 @@
13271327
<groupId>commons-logging</groupId>
13281328
<artifactId>commons-logging</artifactId>
13291329
</exclusion>
1330+
<exclusion>
1331+
<groupId>org.codehaus.groovy</groupId>
1332+
<artifactId>groovy-all</artifactId>
1333+
</exclusion>
13301334
</exclusions>
13311335
</dependency>
13321336
<dependency>
@@ -1398,6 +1402,10 @@
13981402
<groupId>commons-logging</groupId>
13991403
<artifactId>commons-logging</artifactId>
14001404
</exclusion>
1405+
<exclusion>
1406+
<groupId>org.codehaus.groovy</groupId>
1407+
<artifactId>groovy-all</artifactId>
1408+
</exclusion>
14011409
</exclusions>
14021410
</dependency>
14031411

@@ -1492,6 +1500,10 @@
14921500
<groupId>commons-logging</groupId>
14931501
<artifactId>commons-logging</artifactId>
14941502
</exclusion>
1503+
<exclusion>
1504+
<groupId>org.codehaus.groovy</groupId>
1505+
<artifactId>groovy-all</artifactId>
1506+
</exclusion>
14951507
</exclusions>
14961508
</dependency>
14971509

@@ -1537,6 +1549,10 @@
15371549
<groupId>org.apache.thrift</groupId>
15381550
<artifactId>libthrift</artifactId>
15391551
</exclusion>
1552+
<exclusion>
1553+
<groupId>org.codehaus.groovy</groupId>
1554+
<artifactId>groovy-all</artifactId>
1555+
</exclusion>
15401556
</exclusions>
15411557
</dependency>
15421558

@@ -1585,6 +1601,10 @@
15851601
<groupId>commons-logging</groupId>
15861602
<artifactId>commons-logging</artifactId>
15871603
</exclusion>
1604+
<exclusion>
1605+
<groupId>org.codehaus.groovy</groupId>
1606+
<artifactId>groovy-all</artifactId>
1607+
</exclusion>
15881608
</exclusions>
15891609
</dependency>
15901610
<dependency>
@@ -1809,6 +1829,7 @@
18091829
io.netty:netty and io.netty:netty-all.
18101830
-->
18111831
<exclude>org.jboss.netty</exclude>
1832+
<exclude>org.codehaus.groovy</exclude>
18121833
</excludes>
18131834
<searchTransitive>true</searchTransitive>
18141835
</bannedDependencies>

0 commit comments

Comments
 (0)