Skip to content

Commit

Permalink
[INLONG-10053][Sort] Support flink-connector-pulsar based on flink 1.…
Browse files Browse the repository at this point in the history
…18 (apache#10063)
  • Loading branch information
aloyszhang authored Apr 25, 2024
1 parent 5e83645 commit 4db62df
Show file tree
Hide file tree
Showing 12 changed files with 1,355 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,12 @@ jobs:
name: apache-inlong-${{ env.VERSION }}-sort-connectors-flink-v1.15.tar.gz
path: ./inlong-distribution/target/apache-inlong-${{ env.VERSION }}-sort-connectors-flink-v1.15.tar.gz

- name: Upload sort connectors package for flink v1.18
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: apache-inlong-${{ env.VERSION }}-sort-connectors-flink-v1.18.tar.gz
path: ./inlong-distribution/target/apache-inlong-${{ env.VERSION }}-sort-connectors-flink-v1.18.tar.gz

- name: Clean up build packages
run: mvn clean
1 change: 1 addition & 0 deletions inlong-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<descriptors>
<descriptor>src/main/assemblies/sort-connectors-v1.13.xml</descriptor>
<descriptor>src/main/assemblies/sort-connectors-v1.15.xml</descriptor>
<descriptor>src/main/assemblies/sort-connectors-v1.18.xml</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down
40 changes: 40 additions & 0 deletions inlong-distribution/src/main/assemblies/sort-connectors-v1.18.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->

<assembly>
<id>sort-connectors-flink-v1.18</id>

<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<!--connector plugin-->
<fileSet>
<directory>../inlong-sort/sort-flink/sort-flink-v1.18/sort-connectors/pulsar/target</directory>
<outputDirectory>inlong-sort/connectors</outputDirectory>
<includes>
<include>sort-connector-pulsar-v1.18-${project.version}.jar</include>
</includes>
<fileMode>0644</fileMode>
</fileSet>

</fileSets>
</assembly>
1 change: 1 addition & 0 deletions inlong-sort/sort-flink/sort-flink-v1.18/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<modules>
<module>sort-flink-dependencies</module>
<module>sort-connectors</module>
</modules>

<properties>
Expand Down
49 changes: 49 additions & 0 deletions inlong-sort/sort-flink/sort-flink-v1.18/sort-connectors/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-flink-v1.18</artifactId>
<version>1.13.0-SNAPSHOT</version>
</parent>

<artifactId>sort-connectors-v1.18</artifactId>
<packaging>pom</packaging>
<name>Apache InLong - Sort Connectors v1.18</name>

<modules>
<module>pulsar</module>
</modules>

<properties>
<inlong.root.dir>${project.parent.parent.parent.parent.basedir}</inlong.root.dir>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-flink-dependencies-v1.18</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

</project>
121 changes: 121 additions & 0 deletions inlong-sort/sort-flink/sort-flink-v1.18/sort-connectors/pulsar/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-connectors-v1.18</artifactId>
<version>1.13.0-SNAPSHOT</version>
</parent>

<artifactId>sort-connector-pulsar-v1.18</artifactId>
<packaging>jar</packaging>
<name>Apache InLong - Sort-connector-pulsar</name>

<properties>
<inlong.root.dir>${project.parent.parent.parent.parent.parent.basedir}</inlong.root.dir>
<flink.connector.version>4.1.0-1.18</flink.connector.version>
<pulsar.version>3.0.2</pulsar.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.pulsar</groupId>
<artifactId>pulsar-client-all</artifactId>
<version>${pulsar.version}</version>
</dependency>
<dependency>
<groupId>org.apache.inlong</groupId>
<artifactId>sort-connector-base</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-base</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-pulsar</artifactId>
<version>${flink.connector.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<!-- Shade all the dependencies to avoid conflicts -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-flink</id>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
<configuration>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<includes>
<include>org.apache.inlong:*</include>
<include>io.streamnative.connectors:pulsar-flink-connector-origin*</include>
<include>io.streamnative.connectors:flink-protobuf</include>
<include>org.apache.pulsar:*</include>
<include>org.apache.flink:flink-connector-pulsar</include>
<include>com.google.protobuf:*</include>
<include>org.bouncycastle*:*</include>
<include>org.bouncycastle*:*</include>
<include>javax.*:*</include>
<include>org.lz4*:*</include>
<include>org.slf4j:jul-to-slf4j</include>
<include>io.airlift:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>org.apache.inlong:sort-connector-*</artifact>
<includes>
<include>org/apache/inlong/**</include>
<include>META-INF/services/org.apache.flink.table.factories.Factory</include>
</includes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>log4j.properties</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.PluginXmlResourceTransformer" />
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 4db62df

Please sign in to comment.