From 242e530490cdfa23b035242da6898e2d883920b8 Mon Sep 17 00:00:00 2001 From: Yuxin Tan <tanyuxinwork@gmail.com> Date: Thu, 25 May 2023 17:16:15 +0200 Subject: [PATCH] [FLINK-32194][connectors/elasticsearch] Remove the dependency on flink-shaded (cherry picked from commit 71a8567bbd83a111df4f85d4465e4cda0ccae916) --- .editorconfig | 2 +- .../sink/ElasticsearchSinkBaseITCase.java | 5 ++--- pom.xml | 11 ++--------- tools/maven/checkstyle.xml | 6 +----- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2e260749..6fcca23b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -113,7 +113,7 @@ ij_java_doc_preserve_line_breaks = false # ij_java_generate_final_locals = false # ij_java_generate_final_parameters = false # ij_java_if_brace_force = never -ij_java_imports_layout = org.apache.flink.**,|,org.apache.flink.shaded.**,|,*,|,javax.**,|,java.**,|,scala.**,|,$* +ij_java_imports_layout = org.apache.flink.**,|,*,|,javax.**,|,java.**,|,scala.**,|,$* # ij_java_indent_case_from_switch = true # ij_java_insert_inner_class_imports = false # ij_java_insert_override_annotation = true diff --git a/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchSinkBaseITCase.java b/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchSinkBaseITCase.java index bd574d8f..613a1b33 100644 --- a/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchSinkBaseITCase.java +++ b/flink-connector-elasticsearch-base/src/test/java/org/apache/flink/connector/elasticsearch/sink/ElasticsearchSinkBaseITCase.java @@ -28,8 +28,6 @@ import org.apache.flink.test.junit5.MiniClusterExtension; import org.apache.flink.util.TestLoggerExtension; -import org.apache.flink.shaded.guava30.com.google.common.collect.Lists; - import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; @@ -51,6 +49,7 @@ import javax.annotation.Nullable; import java.io.IOException; +import java.util.Arrays; import java.util.List; import java.util.UUID; import java.util.function.BiFunction; @@ -206,7 +205,7 @@ public Tuple2<Integer, String> map(Long value) throws Exception { private static List<BiFunction<String, String, ElasticsearchEmitter<Tuple2<Integer, String>>>> elasticsearchEmitters() { - return Lists.newArrayList(TestEmitter::jsonEmitter, TestEmitter::smileEmitter); + return Arrays.asList(TestEmitter::jsonEmitter, TestEmitter::smileEmitter); } private static class FailingMapper implements MapFunction<Long, Long>, CheckpointListener { diff --git a/pom.xml b/pom.xml index ba2785cd..04c27129 100644 --- a/pom.xml +++ b/pom.xml @@ -20,9 +20,9 @@ under the License. xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <parent> - <groupId>io.github.zentol.flink</groupId> + <groupId>org.apache.flink</groupId> <artifactId>flink-connector-parent</artifactId> - <version>1.0</version> + <version>1.0.0</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -51,7 +51,6 @@ under the License. <properties> <flink.version>1.16.2</flink.version> - <flink.shaded.version>15.0</flink.shaded.version> <jackson-bom.version>2.13.4.20221013</jackson-bom.version> <junit4.version>4.13.2</junit4.version> @@ -75,12 +74,6 @@ under the License. </properties> <dependencies> - <dependency> - <groupId>org.apache.flink</groupId> - <artifactId>flink-shaded-force-shading</artifactId> - <version>${flink.shaded.version}</version> - </dependency> - <!-- Root dependencies for all projects --> <!-- Logging API --> diff --git a/tools/maven/checkstyle.xml b/tools/maven/checkstyle.xml index 2048fd18..17888ee8 100644 --- a/tools/maven/checkstyle.xml +++ b/tools/maven/checkstyle.xml @@ -195,7 +195,7 @@ This file is based on the checkstyle file of Apache Beam. <!-- Checks for out of order import statements. --> <property name="severity" value="error"/> <property name="groups" - value="org.apache.flink,org.apache.flink.shaded,*,javax,java,scala"/> + value="org.apache.flink,*,javax,java,scala"/> <property name="separated" value="true"/> <property name="sortStaticImportsAlphabetically" value="true"/> <property name="option" value="bottom"/> @@ -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.