This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new b76822294 [core] Forbid the use of org.apache.hadoop.shaded (#2383)
b76822294 is described below

commit b7682229464b216d59eaccafd0af46087dfe19bf
Author: monkey_boy <[email protected]>
AuthorDate: Fri Nov 24 11:31:33 2023 +0800

    [core] Forbid the use of org.apache.hadoop.shaded (#2383)
---
 .../test/java/org/apache/paimon/tests/cdc/MySqlCdcE2eTestBase.java  | 2 +-
 .../src/main/java/org/apache/paimon/spark/SparkProcedures.java      | 2 +-
 tools/maven/checkstyle.xml                                          | 6 ++++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/paimon-e2e-tests/src/test/java/org/apache/paimon/tests/cdc/MySqlCdcE2eTestBase.java
 
b/paimon-e2e-tests/src/test/java/org/apache/paimon/tests/cdc/MySqlCdcE2eTestBase.java
index f52d505cf..23f7b6dc9 100644
--- 
a/paimon-e2e-tests/src/test/java/org/apache/paimon/tests/cdc/MySqlCdcE2eTestBase.java
+++ 
b/paimon-e2e-tests/src/test/java/org/apache/paimon/tests/cdc/MySqlCdcE2eTestBase.java
@@ -21,10 +21,10 @@ package org.apache.paimon.tests.cdc;
 import org.apache.paimon.flink.action.cdc.mysql.MySqlContainer;
 import org.apache.paimon.flink.action.cdc.mysql.MySqlVersion;
 import org.apache.paimon.tests.E2eTestBase;
+import org.apache.paimon.utils.StringUtils;
 
 import org.apache.paimon.shade.guava30.com.google.common.collect.ImmutableMap;
 
-import org.apache.hadoop.shaded.org.apache.commons.lang3.StringUtils;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
diff --git 
a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkProcedures.java
 
b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkProcedures.java
index 2b9f32b7f..fa25fd4a6 100644
--- 
a/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkProcedures.java
+++ 
b/paimon-spark/paimon-spark-common/src/main/java/org/apache/paimon/spark/SparkProcedures.java
@@ -25,7 +25,7 @@ import org.apache.paimon.spark.procedure.Procedure;
 import org.apache.paimon.spark.procedure.ProcedureBuilder;
 import org.apache.paimon.spark.procedure.RollbackProcedure;
 
-import org.apache.hadoop.shaded.com.google.common.collect.ImmutableMap;
+import org.apache.paimon.shade.guava30.com.google.common.collect.ImmutableMap;
 
 import java.util.Locale;
 import java.util.Map;
diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml
index 2b0a0f19c..83da7702a 100644
--- a/tools/maven/checkstyle.xml
+++ b/tools/maven/checkstyle.xml
@@ -132,6 +132,12 @@ This file is based on the checkstyle file of Apache Beam.
                        <property name="message"
                                          value="Use Flink's Preconditions 
instead of Guava's Preconditions"/>
                </module>
+               <module name="Regexp">
+                       <property name="format" 
value="org\.apache\.hadoop\.shaded"/>
+                       <property name="illegalPattern" value="true"/>
+                       <property name="message"
+                               value="Use Paimon's shade instead of hadoop's 
shade"/>
+               </module>
                <!-- forbid the use of 
com.google.common.annotations.VisibleForTesting -->
                <module name="Regexp">
                        <property name="format"

Reply via email to