You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2016/12/02 17:23:50 UTC
kudu git commit: flume sink: Fix jar shading
Repository: kudu
Updated Branches:
refs/heads/master 6be01642b -> a6c17552a
flume sink: Fix jar shading
Previously, when generating the kudu-flume-sink jar, we pulled in many
unshaded dependencies. This change improves the situation considerably
by doing the following:
1. Make the hadoop jars provided. This is fine because Flume always puts
the Hadoop jars for the version it is running against on its
classpath.
2. Use the transitive shading provided by the kudu-client jar. This
makes it so that the kudu-client dependencies don't pollute the
classpath. Previously, unshaded kudu-client dependencies were being
included in the kudu-flume-sink jar (which I found surprising).
After this change the only non-org.apache.kudu classes in the classpath
are inherited from kudu-client, and once we fix KUDU-1780 then that will
be resolved as well.
Change-Id: I0ac2b67636c9f13f56cec2ea526d42c9e11f6b78
Reviewed-on: http://gerrit.cloudera.org:8080/5327
Reviewed-by: Will Berkeley <wd...@gmail.com>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/a6c17552
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/a6c17552
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/a6c17552
Branch: refs/heads/master
Commit: a6c17552ae7b1a591d0b8760c5a4530c15690680
Parents: 6be0164
Author: Mike Percy <mp...@apache.org>
Authored: Fri Dec 2 16:28:32 2016 +0000
Committer: Mike Percy <mp...@apache.org>
Committed: Fri Dec 2 17:23:29 2016 +0000
----------------------------------------------------------------------
java/kudu-flume-sink/pom.xml | 31 +++++++------------------------
1 file changed, 7 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/a6c17552/java/kudu-flume-sink/pom.xml
----------------------------------------------------------------------
diff --git a/java/kudu-flume-sink/pom.xml b/java/kudu-flume-sink/pom.xml
index 98a2106..18f5fc7 100644
--- a/java/kudu-flume-sink/pom.xml
+++ b/java/kudu-flume-sink/pom.xml
@@ -29,34 +29,16 @@
<build>
<plugins>
<plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>${maven-assembly-plugin.version}</version>
- <configuration>
- <descriptorRefs>
- <descriptorRef>jar-with-dependencies</descriptorRef>
- </descriptorRefs>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
- <relocations>
- <relocation>
- <pattern>org.apache.hadoop</pattern>
- <shadedPattern>org.apache.kudu.flume.sink.shaded.org.apache.hadoop</shadedPattern>
- </relocation>
- </relocations>
+ <artifactSet>
+ <includes>
+ <!-- We want to transitively shade what kudu-client shades. -->
+ <include>org.apache.kudu:kudu-client</include>
+ </includes>
+ </artifactSet>
<shadeTestJar>true</shadeTestJar>
</configuration>
<executions>
@@ -116,6 +98,7 @@
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>