Skip to content

Commit

Permalink
[HUDI-4810] Fixing Hudi bundles requiring log4j2 on the classpath (ap…
Browse files Browse the repository at this point in the history
…ache#6631)

Downgrading all of the log4j2 deps to "provided" scope, since these are not API modules (as advertised), but rather fully-fledged implementations adding dependency on other modules (like log4j2 in the case of "log4j-1.2-api")
  • Loading branch information
Alexey Kudinkin authored and voonhous committed Oct 7, 2022
1 parent 5cfd306 commit d093759
Show file tree
Hide file tree
Showing 33 changed files with 212 additions and 160 deletions.
6 changes: 6 additions & 0 deletions hudi-aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
</properties>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
<version>${scala.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-client/hudi-client-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<packaging>jar</packaging>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
16 changes: 15 additions & 1 deletion hudi-client/hudi-flink-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,21 @@
</properties>

<dependencies>
<!-- Hudi -->
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-client-common</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-client/hudi-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<packaging>jar</packaging>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-client/hudi-spark-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
<version>${scala.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
18 changes: 1 addition & 17 deletions hudi-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,11 @@
</build>

<dependencies>
<!-- Logging dependencies -->
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Fasterxml -->
<dependency>
Expand Down
7 changes: 7 additions & 0 deletions hudi-examples/hudi-examples-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,13 @@
</build>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-examples-common</artifactId>
Expand Down
13 changes: 8 additions & 5 deletions hudi-examples/hudi-examples-spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,20 @@
</build>

<dependencies>
<!-- Scala -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-examples-common</artifactId>
Expand Down Expand Up @@ -236,11 +244,6 @@
</exclusion>
</exclusions>
</dependency>
<!-- Logging dependencies -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>

<!-- Junit dependencies -->
<dependency>
Expand Down
14 changes: 14 additions & 0 deletions hudi-flink-datasource/hudi-flink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@
</build>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
15 changes: 15 additions & 0 deletions hudi-flink-datasource/hudi-flink1.13.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@
</properties>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-common</artifactId>
Expand Down
15 changes: 15 additions & 0 deletions hudi-flink-datasource/hudi-flink1.14.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@
</properties>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-common</artifactId>
Expand Down
15 changes: 15 additions & 0 deletions hudi-flink-datasource/hudi-flink1.15.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@
</properties>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-common</artifactId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-gcp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ See https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google
</dependencyManagement>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-hadoop-mr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
</properties>

<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hudi -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
3 changes: 1 addition & 2 deletions hudi-integ-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@
<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>compile</scope>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie - Import -->
Expand Down
7 changes: 0 additions & 7 deletions hudi-kafka-connect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,6 @@
<artifactId>protobuf-java</artifactId>
<version>${proto.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<scope>compile</scope>
</dependency>

<!-- Fasterxml -->
<dependency>
Expand Down
6 changes: 6 additions & 0 deletions hudi-spark-datasource/hudi-spark-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@
<version>${scala.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
6 changes: 6 additions & 0 deletions hudi-spark-datasource/hudi-spark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
<version>${scala.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
</dependency>

<!-- Hoodie -->
<dependency>
<groupId>org.apache.hudi</groupId>
Expand Down
8 changes: 8 additions & 0 deletions hudi-spark-datasource/hudi-spark3.2.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@
</exclusions>
</dependency>

<!-- Hoodie - Test -->
<dependency>
<groupId>org.apache.hudi</groupId>
<artifactId>hudi-tests-common</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.json4s</groupId>
<artifactId>json4s-jackson_${scala.binary.version}</artifactId>
Expand Down

This file was deleted.

Loading

0 comments on commit d093759

Please sign in to comment.