Skip to content

Commit fc1685e

Browse files
Alexey Kudinkinyuzhaojing
authored andcommitted
[HUDI-4810] Fixing Hudi bundles requiring log4j2 on the classpath (#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")
1 parent 64ce767 commit fc1685e

33 files changed

Lines changed: 212 additions & 160 deletions

File tree

hudi-aws/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
</properties>
3535

3636
<dependencies>
37+
<!-- Logging -->
38+
<dependency>
39+
<groupId>org.apache.logging.log4j</groupId>
40+
<artifactId>log4j-1.2-api</artifactId>
41+
</dependency>
42+
3743
<!-- Hoodie -->
3844
<dependency>
3945
<groupId>org.apache.hudi</groupId>

hudi-cli/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@
139139
<version>${scala.version}</version>
140140
</dependency>
141141

142+
<!-- Logging -->
143+
<dependency>
144+
<groupId>org.apache.logging.log4j</groupId>
145+
<artifactId>log4j-1.2-api</artifactId>
146+
</dependency>
147+
142148
<!-- Hoodie -->
143149
<dependency>
144150
<groupId>org.apache.hudi</groupId>

hudi-client/hudi-client-common/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<packaging>jar</packaging>
3131

3232
<dependencies>
33+
<!-- Logging -->
34+
<dependency>
35+
<groupId>org.apache.logging.log4j</groupId>
36+
<artifactId>log4j-1.2-api</artifactId>
37+
</dependency>
38+
3339
<!-- Hoodie -->
3440
<dependency>
3541
<groupId>org.apache.hudi</groupId>

hudi-client/hudi-flink-client/pom.xml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,21 @@
3535
</properties>
3636

3737
<dependencies>
38-
<!-- Hudi -->
38+
<!-- Logging -->
39+
<dependency>
40+
<groupId>org.apache.logging.log4j</groupId>
41+
<artifactId>log4j-1.2-api</artifactId>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.apache.logging.log4j</groupId>
45+
<artifactId>log4j-slf4j-impl</artifactId>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.slf4j</groupId>
49+
<artifactId>slf4j-api</artifactId>
50+
</dependency>
51+
52+
<!-- Hudi -->
3953
<dependency>
4054
<groupId>org.apache.hudi</groupId>
4155
<artifactId>hudi-client-common</artifactId>

hudi-client/hudi-java-client/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<packaging>jar</packaging>
3131

3232
<dependencies>
33+
<!-- Logging -->
34+
<dependency>
35+
<groupId>org.apache.logging.log4j</groupId>
36+
<artifactId>log4j-1.2-api</artifactId>
37+
</dependency>
38+
3339
<!-- Hudi -->
3440
<dependency>
3541
<groupId>org.apache.hudi</groupId>

hudi-client/hudi-spark-client/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
<version>${scala.version}</version>
3838
</dependency>
3939

40+
<!-- Logging -->
41+
<dependency>
42+
<groupId>org.apache.logging.log4j</groupId>
43+
<artifactId>log4j-1.2-api</artifactId>
44+
</dependency>
45+
4046
<!-- Hudi -->
4147
<dependency>
4248
<groupId>org.apache.hudi</groupId>

hudi-common/pom.xml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -101,27 +101,11 @@
101101
</build>
102102

103103
<dependencies>
104-
<!-- Logging dependencies -->
104+
<!-- Logging -->
105105
<dependency>
106106
<groupId>org.apache.logging.log4j</groupId>
107107
<artifactId>log4j-1.2-api</artifactId>
108108
</dependency>
109-
<dependency>
110-
<groupId>org.apache.logging.log4j</groupId>
111-
<artifactId>log4j-api</artifactId>
112-
</dependency>
113-
<dependency>
114-
<groupId>org.apache.logging.log4j</groupId>
115-
<artifactId>log4j-slf4j-impl</artifactId>
116-
</dependency>
117-
<dependency>
118-
<groupId>org.slf4j</groupId>
119-
<artifactId>jul-to-slf4j</artifactId>
120-
</dependency>
121-
<dependency>
122-
<groupId>org.slf4j</groupId>
123-
<artifactId>slf4j-api</artifactId>
124-
</dependency>
125109

126110
<!-- Fasterxml -->
127111
<dependency>

hudi-examples/hudi-examples-java/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@
108108
</build>
109109

110110
<dependencies>
111+
<!-- Logging -->
112+
<dependency>
113+
<groupId>org.apache.logging.log4j</groupId>
114+
<artifactId>log4j-1.2-api</artifactId>
115+
</dependency>
116+
117+
<!-- Hudi -->
111118
<dependency>
112119
<groupId>org.apache.hudi</groupId>
113120
<artifactId>hudi-examples-common</artifactId>

hudi-examples/hudi-examples-spark/pom.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,20 @@
108108
</build>
109109

110110
<dependencies>
111+
<!-- Scala -->
111112
<dependency>
112113
<groupId>org.scala-lang</groupId>
113114
<artifactId>scala-library</artifactId>
114115
<version>${scala.version}</version>
115116
</dependency>
116117

118+
<!-- Logging -->
119+
<dependency>
120+
<groupId>org.apache.logging.log4j</groupId>
121+
<artifactId>log4j-1.2-api</artifactId>
122+
</dependency>
123+
124+
<!-- Hudi -->
117125
<dependency>
118126
<groupId>org.apache.hudi</groupId>
119127
<artifactId>hudi-examples-common</artifactId>
@@ -236,11 +244,6 @@
236244
</exclusion>
237245
</exclusions>
238246
</dependency>
239-
<!-- Logging dependencies -->
240-
<dependency>
241-
<groupId>org.apache.logging.log4j</groupId>
242-
<artifactId>log4j-core</artifactId>
243-
</dependency>
244247

245248
<!-- Junit dependencies -->
246249
<dependency>

hudi-flink-datasource/hudi-flink/pom.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@
7575
</build>
7676

7777
<dependencies>
78+
<!-- Logging -->
79+
<dependency>
80+
<groupId>org.apache.logging.log4j</groupId>
81+
<artifactId>log4j-1.2-api</artifactId>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.apache.logging.log4j</groupId>
85+
<artifactId>log4j-slf4j-impl</artifactId>
86+
</dependency>
87+
<dependency>
88+
<groupId>org.slf4j</groupId>
89+
<artifactId>slf4j-api</artifactId>
90+
</dependency>
91+
7892
<!-- Hoodie -->
7993
<dependency>
8094
<groupId>org.apache.hudi</groupId>

0 commit comments

Comments
 (0)