This is an automated email from the ASF dual-hosted git repository.
akudinkin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 60dfe4d766d Cleaning up unnecessary relocation for com.google.common
packages (#7900)
60dfe4d766d is described below
commit 60dfe4d766d6050bb811e4f7d51b88126b5d5575
Author: Alexey Kudinkin <[email protected]>
AuthorDate: Thu Feb 9 08:44:23 2023 -0800
Cleaning up unnecessary relocation for com.google.common packages (#7900)
Addresses an issue of following relocations configs in MR/Spark bundles
stranded after removal of Guava from Hudi Spark and MR bundles:
```
<relocation>
<pattern>com.google.common.</pattern>
<shadedPattern>org.apache.hudi.com.google.common.</shadedPattern>
</relocation>
```
Such relocations entailed that all references from any class (included into
the Hudi bundle) referencing Guava would be shaded, even though Hudi isn't
packaging Guava anymore, potentially resulting in exception when these classes
try to access Guava provided by Spark for ex:
```
Caused by: java.lang.NoClassDefFoundError:
org/apache/hudi/com/google/common/base/Preconditions
at
org.apache.curator.ensemble.fixed.FixedEnsembleProvider.<init>(FixedEnsembleProvider.java:39)
at
org.apache.curator.framework.CuratorFrameworkFactory$Builder.connectString(CuratorFrameworkFactory.java:193)
at
org.apache.kyuubi.ha.client.zookeeper.ZookeeperClientProvider$.buildZookeeperClient(ZookeeperClientProvider.scala:62)
at
org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient.<init>(ZookeeperDiscoveryClient.scala:65)
... 45 more
```
---
packaging/hudi-hadoop-mr-bundle/pom.xml | 4 ----
packaging/hudi-spark-bundle/pom.xml | 4 ----
2 files changed, 8 deletions(-)
diff --git a/packaging/hudi-hadoop-mr-bundle/pom.xml
b/packaging/hudi-hadoop-mr-bundle/pom.xml
index 1df69d6ef8c..ec2dddd8d7f 100644
--- a/packaging/hudi-hadoop-mr-bundle/pom.xml
+++ b/packaging/hudi-hadoop-mr-bundle/pom.xml
@@ -117,10 +117,6 @@
<pattern>org.apache.parquet.avro.</pattern>
<shadedPattern>org.apache.hudi.org.apache.parquet.avro.</shadedPattern>
</relocation>
- <relocation>
- <pattern>com.google.common.</pattern>
-
<shadedPattern>org.apache.hudi.com.google.common.</shadedPattern>
- </relocation>
<relocation>
<pattern>org.openjdk.jol.</pattern>
<shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>
diff --git a/packaging/hudi-spark-bundle/pom.xml
b/packaging/hudi-spark-bundle/pom.xml
index 4e93f399275..32c7ee8bc90 100644
--- a/packaging/hudi-spark-bundle/pom.xml
+++ b/packaging/hudi-spark-bundle/pom.xml
@@ -189,10 +189,6 @@
<pattern>org.eclipse.jetty.</pattern>
<shadedPattern>org.apache.hudi.org.apache.jetty.</shadedPattern>
</relocation>
- <relocation>
- <pattern>com.google.common.</pattern>
-
<shadedPattern>org.apache.hudi.com.google.common.</shadedPattern>
- </relocation>
<relocation>
<pattern>org.openjdk.jol.</pattern>
<shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>