-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INLONG-8695][Sort] Add Pulsar connector based on flink 1.15 (#9005)
- Loading branch information
Showing
14 changed files
with
2,044 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
277 changes: 277 additions & 0 deletions
277
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/pulsar/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,277 @@ | ||
<?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.15</artifactId> | ||
<version>1.10.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>sort-connector-pulsar-v1.15</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Apache InLong - Sort-connector-pulsar-v1.15</name> | ||
|
||
<properties> | ||
<pulsar.version>2.10.2</pulsar.version> | ||
<flink.connector.pulsar.version>3.0-SNAPSHOT</flink.connector.pulsar.version> | ||
<inlong.root.dir>${project.parent.parent.parent.parent.parent.basedir}</inlong.root.dir> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-connector-base</artifactId> | ||
<version>${flink.version}</version> | ||
</dependency> | ||
|
||
<!-- Connectors --> | ||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-streaming-java</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- Table ecosystem --> | ||
|
||
<!-- Projects depending on this project won't depend on flink-table-*. --> | ||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-table-api-java-bridge</artifactId> | ||
<version>${flink.version}</version> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<!-- Formats --> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-avro</artifactId> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-json</artifactId> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<!-- Protobuf & Protobuf Native Schema support. Add it to your pom if you need protobuf --> | ||
|
||
<dependency> | ||
<groupId>com.google.protobuf</groupId> | ||
<artifactId>protobuf-java</artifactId> | ||
<scope>provided</scope> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<!-- Pulsar Client --> | ||
|
||
<dependency> | ||
<groupId>org.apache.pulsar</groupId> | ||
<artifactId>pulsar-client-all</artifactId> | ||
<version>${pulsar.version}</version> | ||
</dependency> | ||
|
||
<!-- Tests --> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-core</artifactId> | ||
<version>${flink.version}</version> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-streaming-java</artifactId> | ||
<version>${flink.version}</version> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-connector-pulsar</artifactId> | ||
<version>${flink.connector.pulsar.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.flink</groupId> | ||
<artifactId>flink-table-common</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.xolstice.maven.plugins</groupId> | ||
<artifactId>protobuf-maven-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<!-- Currently Flink azure test pipeline would first pre-compile and then upload the compiled | ||
directory, then it download the directory and run the corresponding tests. However, the protoc | ||
executable under the target directory would lost the execution permission bit after downloading. | ||
To solve this issue we would skip generating the target files if they already exist after | ||
downloading. Meanwhile, since the time might be not consistent between the pre-compile and | ||
the actual execution, we need to adjust the timestamp manually, see unpack_build_artifact.sh--> | ||
<checkStaleness>true</checkStaleness> | ||
<protoTestSourceRoot>${project.basedir}/src/test/resources/protobuf</protoTestSourceRoot> | ||
<!-- Generates classes into a separate directory since the generator always removes existing files. --> | ||
<outputDirectory>${project.build.directory}/generated-test-sources/protobuf/java</outputDirectory> | ||
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-compile</goal> | ||
</goals> | ||
<phase>generate-sources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- Adding protobuf generated classes to test build path --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>add-test-source</id> | ||
<goals> | ||
<goal>add-test-source</goal> | ||
</goals> | ||
<phase>generate-sources</phase> | ||
<configuration> | ||
<sources> | ||
<source>${project.build.directory}/generated-test-sources/protobuf/java</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-jar</goal> | ||
</goals> | ||
<configuration> | ||
<includes> | ||
<include>**/testutils/**</include> | ||
<include>META-INF/LICENSE</include> | ||
<include>META-INF/NOTICE</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-test-sources</id> | ||
<goals> | ||
<goal>test-jar-no-fork</goal> | ||
</goals> | ||
<configuration> | ||
<archive> | ||
<!-- Globally exclude maven metadata, because it may accidentally bundle files we don't intend to --> | ||
<addMavenDescriptor>false</addMavenDescriptor> | ||
</archive> | ||
<includes> | ||
<include>**/testutils/**</include> | ||
<include>META-INF/LICENSE</include> | ||
<include>META-INF/NOTICE</include> | ||
</includes> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
|
||
</plugin> | ||
|
||
<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> |
Oops, something went wrong.