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

chesnay pushed a commit to branch v3.0
in repository https://gitbox.apache.org/repos/asf/flink-connector-cassandra.git

commit 25de5b58107c5211e7a5100a3c6b0e2cc352da67
Author: Etienne Chauchot <echauc...@apache.org>
AuthorDate: Thu Apr 6 13:00:30 2023 +0200

    [FLINK-31722] use cassandra driver provided guava as it already surfaces in 
the cassandra driver API. shade provided guava.
---
 flink-connector-cassandra/pom.xml                  |  1 +
 .../CassandraColumnarOutputFormatBase.java         |  3 +-
 .../cassandra/CassandraInputFormatBase.java        |  3 +-
 tools/maven/checkstyle.xml                         |  4 ---
 tools/maven/suppressions.xml                       | 38 +++++++++-------------
 5 files changed, 19 insertions(+), 30 deletions(-)

diff --git a/flink-connector-cassandra/pom.xml 
b/flink-connector-cassandra/pom.xml
index aea5308..0373ace 100644
--- a/flink-connector-cassandra/pom.xml
+++ b/flink-connector-cassandra/pom.xml
@@ -153,6 +153,7 @@ under the License.
                        </exclusions>
                </dependency>
 
+               <!-- guava already surfaces in the API of cassandra driver so 
we can use the unshaded one -->
                <dependency>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
diff --git 
a/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraColumnarOutputFormatBase.java
 
b/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraColumnarOutputFormatBase.java
index cb2346e..def3015 100644
--- 
a/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraColumnarOutputFormatBase.java
+++ 
b/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraColumnarOutputFormatBase.java
@@ -20,11 +20,10 @@ package org.apache.flink.batch.connectors.cassandra;
 import org.apache.flink.streaming.connectors.cassandra.ClusterBuilder;
 import org.apache.flink.util.Preconditions;
 
-import org.apache.flink.shaded.guava30.com.google.common.base.Strings;
-
 import com.datastax.driver.core.PreparedStatement;
 import com.datastax.driver.core.ResultSet;
 import com.datastax.driver.core.ResultSetFuture;
+import com.google.common.base.Strings;
 
 import java.time.Duration;
 import java.util.concurrent.CompletionStage;
diff --git 
a/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraInputFormatBase.java
 
b/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraInputFormatBase.java
index 5b09649..ccd4b9e 100644
--- 
a/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraInputFormatBase.java
+++ 
b/flink-connector-cassandra/src/main/java/org/apache/flink/batch/connectors/cassandra/CassandraInputFormatBase.java
@@ -28,10 +28,9 @@ import org.apache.flink.core.io.InputSplitAssigner;
 import org.apache.flink.streaming.connectors.cassandra.ClusterBuilder;
 import org.apache.flink.util.Preconditions;
 
-import org.apache.flink.shaded.guava30.com.google.common.base.Strings;
-
 import com.datastax.driver.core.Cluster;
 import com.datastax.driver.core.Session;
+import com.google.common.base.Strings;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml
index 3fc4711..576985f 100644
--- a/tools/maven/checkstyle.xml
+++ b/tools/maven/checkstyle.xml
@@ -224,10 +224,6 @@ This file is based on the checkstyle file of Apache Beam.
                        <property name="illegalPkgs" value="io.netty"/>
                        <message key="import.illegal" value="{0}; Use 
flink-shaded-netty instead."/>
                </module>
-               <module name="IllegalImport">
-                       <property name="illegalPkgs" value="com.google.common"/>
-                       <message key="import.illegal" value="{0}; Use 
flink-shaded-guava instead."/>
-               </module>
 
                <module name="RedundantModifier">
                        <!-- Checks for redundant modifiers on various symbol 
definitions.
diff --git a/tools/maven/suppressions.xml b/tools/maven/suppressions.xml
index 8cf47a1..c97d7f1 100644
--- a/tools/maven/suppressions.xml
+++ b/tools/maven/suppressions.xml
@@ -1,31 +1,25 @@
 <?xml version="1.0"?>
 <!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
 
 <!DOCTYPE suppressions PUBLIC
        "-//Puppy Crawl//DTD Suppressions 1.1//EN"
        "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd";>
 
 <suppressions>
-       <!-- Cassandra connectors have to use guava directly -->
-       <suppress
-               
files="AbstractCassandraTupleSink.java|CassandraInputFormat.java|CassandraOutputFormatBase.java|OutputFormatBase.java|OutputFormatBaseTest.java|CassandraColumnarOutputFormatBase.java|CassandraSinkBase.java|CassandraSinkBaseTest.java|CassandraPojoSink.java|CassandraRowSink.java|CassandraTupleWriteAheadSink.java|CassandraRowWriteAheadSink.java|CassandraPojoOutputFormat.java"
-               checks="IllegalImport"/>
-
 </suppressions>

Reply via email to