Skip to content

[FLINK-36971][Connectors/Sqs] Add Sqs SQL connector #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions flink-connector-aws/flink-sql-connector-sqs/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-aws-parent</artifactId>
<version>5.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>flink-sql-connector-sqs</artifactId>
<name>Flink : Connectors : AWS : SQL : Amazon SQS</name>
<packaging>jar</packaging>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils-junit</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-sqs</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-flink</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.apache.flink:flink-connector-aws-base</include>
<include>org.apache.flink:flink-connector-sqs</include>
<include>software.amazon.awssdk:*</include>
<include>org.reactivestreams:*</include>
<include>com.typesafe.netty:*</include>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we double check if com.typesafe.netty:* is actually bundled and relocated in the jar please? I did a quick check and couldn't find it

<include>org.apache.httpcomponents:*</include>
<include>io.netty:*</include>
<include>commons-logging:commons-logging</include>
<include>commons-codec:commons-codec</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>software.amazon</pattern>
<shadedPattern>org.apache.flink.connector.sqs.shaded.software.amazon</shadedPattern>
</relocation>
<relocation>
<pattern>org.reactivestreams</pattern>
<shadedPattern>org.apache.flink.connector.sqs.shaded.org.reactivestreams</shadedPattern>
</relocation>
<relocation>
<pattern>com.typesafe.netty</pattern>
<shadedPattern>org.apache.flink.connector.sqs.shaded.com.typesafe.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.http</pattern>
<shadedPattern>org.apache.flink.connector.sqs.shaded.org.apache.http</shadedPattern>
</relocation>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.apache.flink.connector.sqs.shaded.io.netty</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>org.apache.flink:flink-connector-sqs:*</artifact>
<excludes>
<exclude>profile</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
flink-sql-connector-sqs

Copyright 2022-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

This project bundles the following dependencies under the Apache Software License 2.0. (http://www.apache.org/licenses/LICENSE-2.0.txt)

- software.amazon.awssdk:apache-client:jar:2.26.19
- software.amazon.awssdk:arns:jar:2.26.19
- software.amazon.awssdk:sts:jar:2.26.19
- software.amazon.awssdk:aws-query-protocol:jar:2.26.19
- software.amazon.awssdk:profiles:jar:2.26.19
- software.amazon.awssdk:sqs:jar:2.26.19
- software.amazon.awssdk:aws-json-protocol:jar:2.26.19
- software.amazon.awssdk:third-party-jackson-core:jar:2.26.19
- software.amazon.awssdk:protocol-core:jar:2.26.19
- software.amazon.awssdk:http-auth-aws:jar:2.26.19
- software.amazon.awssdk:checksums-spi:jar:2.26.19
- software.amazon.awssdk:checksums:jar:2.26.19
- software.amazon.awssdk:sdk-core:jar:2.26.19
- software.amazon.awssdk:retries:jar:2.26.19
- software.amazon.awssdk:auth:jar:2.26.19
- software.amazon.awssdk:http-auth-spi:jar:2.26.19
- software.amazon.awssdk:http-auth:jar:2.26.19
- software.amazon.awssdk:identity-spi:jar:2.26.19
- software.amazon.awssdk:http-client-spi:jar:2.26.19
- software.amazon.awssdk:regions:jar:2.26.19
- software.amazon.awssdk:annotations:jar:2.26.19
- software.amazon.awssdk:utils:jar:2.26.19
- software.amazon.awssdk:aws-core:jar:2.26.19
- software.amazon.awssdk:metrics-spi:jar:2.26.19
- software.amazon.awssdk:json-utils:jar:2.26.19
- software.amazon.awssdk:endpoints-spi:jar:2.26.19
- software.amazon.awssdk:retries-spi:jar:2.26.19
- software.amazon.awssdk:netty-nio-client:jar:2.26.19
- io.netty:netty-codec-http:jar:4.1.86.Final
- io.netty:netty-codec-http2:jar:4.1.86.Final
- io.netty:netty-codec:jar:4.1.86.Final
- io.netty:netty-transport:jar:4.1.86.Final
- io.netty:netty-common:jar:4.1.86.Final
- io.netty:netty-buffer:jar:4.1.86.Final
- io.netty:netty-handler:jar:4.1.86.Final
- io.netty:netty-transport-native-unix-common:jar:4.1.86.Final
- io.netty:netty-transport-classes-epoll:jar:4.1.86.Final
- io.netty:netty-resolver:jar:4.1.86.Final
- org.apache.httpcomponents:httpclient:jar:4.5.13
- commons-logging:commons-logging:jar:1.1.3
- org.apache.httpcomponents:httpcore:jar:4.4.14
- commons-codec:commons-codec:jar:1.15


This project bundles the following dependencies under the MIT-0 license (https://spdx.org/licenses/MIT-0.html).

- org.reactivestreams:reactive-streams:jar:1.0.4
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.apache.flink.connector.sqs;

import org.apache.flink.packaging.PackagingTestUtils;
import org.apache.flink.table.factories.Factory;
import org.apache.flink.test.resources.ResourceTestUtils;

import org.junit.jupiter.api.Test;

import java.nio.file.Path;
import java.util.Arrays;

/** Packaging test for the SQS SQL connector. */
public class PackagingITCase {

@Test
void testPackaging() throws Exception {
final Path jar = ResourceTestUtils.getResource(".*/flink-sql-connector-sqs[^/]*\\.jar");

PackagingTestUtils.assertJarContainsOnlyFilesMatching(
jar,
Arrays.asList(
"org/apache/flink/",
"org/apache/commons/",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we shade and relocate this to org.apache.flink.connector.sqs.shaded like the other dependencies?

"META-INF/",
"mozilla/",
"mime.types",
"VersionInfo.java"));
PackagingTestUtils.assertJarContainsServiceEntry(jar, Factory.class);
}
}
1 change: 1 addition & 0 deletions flink-connector-aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ under the License.
<module>flink-sql-connector-aws-kinesis-firehose</module>
<module>flink-sql-connector-aws-kinesis-streams</module>
<module>flink-sql-connector-kinesis</module>
<module>flink-sql-connector-sqs</module>
</modules>

</project>