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

jinsongzhou pushed a commit to branch 0.7.x
in repository https://gitbox.apache.org/repos/asf/amoro.git

commit 6bfbcffeefa4a4dbb7b8ff3b2700a553c1eda3c1
Author: ZhouJinsong <[email protected]>
AuthorDate: Mon Jul 1 18:56:50 2024 +0800

    [Improvement] Add more checking rules for importing guava clesses (#2976)
    
    * Add check rules for iceberg and paimon shade guava clesses
    
    * Remove duplicate checking rule
---
 .../amoro/flink/table/MixedFormatDynamicSource.java  |  2 +-
 tools/maven/checkstyle.xml                           | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git 
a/amoro-mixed-format/amoro-mixed-format-flink/v1.15/amoro-mixed-format-flink-1.15/src/main/java/org/apache/amoro/flink/table/MixedFormatDynamicSource.java
 
b/amoro-mixed-format/amoro-mixed-format-flink/v1.15/amoro-mixed-format-flink-1.15/src/main/java/org/apache/amoro/flink/table/MixedFormatDynamicSource.java
index d102b6c8f..4574c2121 100644
--- 
a/amoro-mixed-format/amoro-mixed-format-flink/v1.15/amoro-mixed-format-flink-1.15/src/main/java/org/apache/amoro/flink/table/MixedFormatDynamicSource.java
+++ 
b/amoro-mixed-format/amoro-mixed-format-flink/v1.15/amoro-mixed-format-flink-1.15/src/main/java/org/apache/amoro/flink/table/MixedFormatDynamicSource.java
@@ -28,6 +28,7 @@ import 
org.apache.amoro.flink.read.source.FlinkKeyedMORDataReader;
 import org.apache.amoro.flink.util.FilterUtil;
 import org.apache.amoro.flink.util.IcebergAndFlinkFilters;
 import org.apache.amoro.hive.io.reader.AbstractAdaptHiveKeyedDataReader;
+import org.apache.amoro.shade.guava32.com.google.common.base.Preconditions;
 import org.apache.amoro.table.MixedTable;
 import org.apache.amoro.utils.SchemaUtil;
 import org.apache.flink.api.common.eventtime.WatermarkStrategy;
@@ -55,7 +56,6 @@ import org.apache.iceberg.Schema;
 import org.apache.iceberg.expressions.Expression;
 import org.apache.iceberg.flink.FlinkSchemaUtil;
 import org.apache.iceberg.flink.data.RowDataUtil;
-import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
 import org.apache.iceberg.types.Type;
 import org.apache.iceberg.types.Types;
 import org.slf4j.Logger;
diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml
index c1e88cd9f..ab4272879 100644
--- a/tools/maven/checkstyle.xml
+++ b/tools/maven/checkstyle.xml
@@ -110,6 +110,16 @@ This file is based on the checkstyle file of Apache Beam.
             <message key="import.illegal" value="{0}; Use amoro shaded guava 
instead."/>
         </module>
 
+        <module name="IllegalImport">
+            <property name="illegalPkgs" 
value="org.apache.iceberg.relocated.com.google.common"/>
+            <message key="import.illegal" value="{0}; Use amoro shaded guava 
instead."/>
+        </module>
+
+        <module name="IllegalImport">
+            <property name="illegalPkgs" 
value="org.apache.paimon.shade.guava30.com.google.common"/>
+            <message key="import.illegal" value="{0}; Use amoro shaded guava 
instead."/>
+        </module>
+
         <module name="Regexp">
             <property name="format" value="import com\.fasterxml\.jackson"/>
             <property name="illegalPattern" value="true"/>
@@ -157,6 +167,16 @@ This file is based on the checkstyle file of Apache Beam.
             <property name="message" value="Use amoro shaded guava instead."/>
         </module>
 
+        <module name="RegexpSinglelineJava">
+            <property name="format" value="^import 
org.apache.iceberg.relocated.com.google.common.base.Preconditions;$"/>
+            <property name="message" value="Use amoro shaded guava instead."/>
+        </module>
+
+        <module name="RegexpSinglelineJava">
+            <property name="format" 
value="^org.apache.paimon.shade.guava30.com.google.common.base.Preconditions;$"/>
+            <property name="message" value="Use amoro shaded guava instead."/>
+        </module>
+
         <!--
 
         JAVADOC CHECKS

Reply via email to