[HUDI-1289] Remove relocation of pattern for hbase dependencies and add shading of guava in hadoop, spark, and presto bundles (#2147)
- Update hudi-spark-bundle pom to not relocate hbase and htrace pattern
- Remove codec relocation as this is not included in bundle which was causing error
diff --git a/packaging/hudi-hadoop-mr-bundle/pom.xml b/packaging/hudi-hadoop-mr-bundle/pom.xml
index 8533ada..b12da4c 100644
--- a/packaging/hudi-hadoop-mr-bundle/pom.xml
+++ b/packaging/hudi-hadoop-mr-bundle/pom.xml
@@ -78,6 +78,7 @@
<include>org.apache.hbase:hbase-server</include>
<include>org.apache.htrace:htrace-core</include>
<include>com.yammer.metrics:metrics-core</include>
+ <include>com.google.guava:guava</include>
</includes>
</artifactSet>
<relocations>
@@ -102,18 +103,8 @@
<shadedPattern>org.apache.hudi.org.apache.avro.</shadedPattern>
</relocation>
<relocation>
- <pattern>org.apache.hadoop.hbase.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.hadoop.hbase.</shadedPattern>
- <excludes>
- <!-- Hive 2.3.3 brings in Hbase 1.1.1 which conflicts with our version even with shading -->
- <!-- Hbase Version check is implemented using a global runtime configuration hbase.defaults.for.version -->
- <!-- The above configuration is auto set by hbase version used by hive at load time which conflicts with our version. Hence, the below exclusion to skip this check -->
- <exclude>org.apache.hadoop.hbase.util.VersionInfo</exclude>
- </excludes>
- </relocation>
- <relocation>
- <pattern>org.apache.htrace.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.htrace.</shadedPattern>
+ <pattern>com.google.common.</pattern>
+ <shadedPattern>org.apache.hudi.com.google.common.</shadedPattern>
</relocation>
</relocations>
<createDependencyReducedPom>false</createDependencyReducedPom>
diff --git a/packaging/hudi-presto-bundle/pom.xml b/packaging/hudi-presto-bundle/pom.xml
index e0ec894..eb50882 100644
--- a/packaging/hudi-presto-bundle/pom.xml
+++ b/packaging/hudi-presto-bundle/pom.xml
@@ -103,14 +103,6 @@
<shadedPattern>org.apache.hudi.com.esotericsoftware.minlog.</shadedPattern>
</relocation>
<relocation>
- <pattern>org.apache.hadoop.hbase.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.hadoop.hbase.</shadedPattern>
- </relocation>
- <relocation>
- <pattern>org.apache.htrace.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.htrace.</shadedPattern>
- </relocation>
- <relocation>
<pattern>com.yammer.metrics.</pattern>
<shadedPattern>org.apache.hudi.com.yammer.metrics.</shadedPattern>
</relocation>
diff --git a/packaging/hudi-spark-bundle/pom.xml b/packaging/hudi-spark-bundle/pom.xml
index 2c22ac3..e4f4bbc 100644
--- a/packaging/hudi-spark-bundle/pom.xml
+++ b/packaging/hudi-spark-bundle/pom.xml
@@ -63,7 +63,6 @@
</transformers>
<artifactSet>
<includes>
- <include>com.yammer.metrics:metrics-core</include>
<include>org.apache.hudi:hudi-common</include>
<include>org.apache.hudi:hudi-client-common</include>
<include>org.apache.hudi:hudi-spark-client</include>
@@ -96,6 +95,7 @@
<include>io.prometheus:simpleclient_pushgateway</include>
<include>io.prometheus:simpleclient_common</include>
<include>com.yammer.metrics:metrics-core</include>
+ <include>com.google.guava:guava</include>
<include>org.apache.spark:spark-avro_${scala.binary.version}</include>
<include>org.apache.hive:hive-common</include>
@@ -157,20 +157,12 @@
<shadedPattern>org.apache.hudi.com.codahale.metrics.</shadedPattern>
</relocation>
<relocation>
- <pattern>org.apache.commons.codec.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.commons.codec.</shadedPattern>
- </relocation>
- <relocation>
<pattern>org.eclipse.jetty.</pattern>
<shadedPattern>org.apache.hudi.org.apache.jetty.</shadedPattern>
</relocation>
<relocation>
- <pattern>org.apache.hadoop.hbase.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.hadoop.hbase.</shadedPattern>
- </relocation>
- <relocation>
- <pattern>org.apache.htrace.</pattern>
- <shadedPattern>org.apache.hudi.org.apache.htrace.</shadedPattern>
+ <pattern>com.google.common.</pattern>
+ <shadedPattern>${spark.bundle.spark.shade.prefix}com.google.common.</shadedPattern>
</relocation>
<!-- TODO: Revisit GH ISSUE #533 & PR#633-->
</relocations>