Skip to content

Commit

Permalink
feat: add flink-1.17 support (DataLinkDC#1955)
Browse files Browse the repository at this point in the history
* feat: add flink-1.17 support

Signed-off-by: Licho <lecho.sun@gmail.com>

* Spotless Apply

* empty

---------

Signed-off-by: Licho <lecho.sun@gmail.com>
Co-authored-by: leechor <leechor@users.noreply.github.com>
  • Loading branch information
leechor and leechor authored May 9, 2023
1 parent 9a092f2 commit 2a59585
Show file tree
Hide file tree
Showing 46 changed files with 6,186 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
fail-fast: true
matrix:
jdk: [8, 11]
flink: [1.13, 1.14, 1.15, 1.16]
flink: [1.13, 1.14, 1.15, 1.16, 1.17]

timeout-minutes: 30
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
fail-fast: true
matrix:
url: [ registry.cn-hangzhou.aliyuncs.com ,docker.io ]
# FLINK_VERSION: [1.11.6 , 1.12.7 , 1.13.6 , 1.14.6 , 1.15.2 , 1.16.0]
# FLINK_VERSION: [1.11.6 , 1.12.7 , 1.13.6 , 1.14.6 , 1.15.2 , 1.16.0, 1.17.0]
include:
- url: registry.cn-hangzhou.aliyuncs.com
namespace: dinky
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
fail-fast: true
matrix:
url: [ registry.cn-hangzhou.aliyuncs.com ,docker.io ]
FLINK_VERSION: [1.13.6 , 1.14.6 , 1.15.2 , 1.16.0]
FLINK_VERSION: [1.13.6 , 1.14.6 , 1.15.2 , 1.16.0, 1.17.0]
include:
- url: registry.cn-hangzhou.aliyuncs.com
namespace: dinky
Expand All @@ -171,6 +171,8 @@ jobs:
FLINK_BIG_VERSION: 1.15
- FLINK_VERSION: 1.16.0
FLINK_BIG_VERSION: 1.16
- FLINK_VERSION : 1.17.0
FLINK_BIG_VERSION: 1.17
steps:
- uses: actions/checkout@v3
- name: set the flink_big_version
Expand Down
76 changes: 76 additions & 0 deletions dinky-app/dinky-app-1.17/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.dinky</groupId>
<artifactId>dinky-app</artifactId>
<version>0.8.0</version>
</parent>
<artifactId>dinky-app-1.17</artifactId>

<packaging>jar</packaging>

<name>Dinky : App 1.17</name>

<properties>
<mainClass>org.dinky.app.MainApp</mainClass>
</properties>

<dependencies>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-app-base</artifactId>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-client-${dinky.flink.version}</artifactId>
<scope>${scope.runtime}</scope>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-flink-${dinky.flink.version}</artifactId>
<scope>${scope.runtime}</scope>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*.properties</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<!-- 可以设置jar包的入口类(可选) -->
<mainClass>org.dinky.app.MainApp</mainClass>
</manifest>
</archive>
<outputDirectory>${project.parent.parent.basedir}/build/extends</outputDirectory>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
45 changes: 45 additions & 0 deletions dinky-app/dinky-app-1.17/src/main/java/org/dinky/app/MainApp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
*
* 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.
*
*/

package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;

import java.io.IOException;
import java.util.Map;

/**
* MainApp
*
* @since 2022/11/05
*/
public class MainApp {

public static void main(String[] args) throws IOException {
Map<String, String> params = FlinkBaseUtil.getParamsFromArgs(args);
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
13 changes: 13 additions & 0 deletions dinky-app/dinky-app-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<artifactId>dinky-flink-1.13</artifactId>
<scope>${scope.runtime}</scope>
</dependency>

<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-client-1.14</artifactId>
Expand All @@ -84,6 +85,7 @@
<artifactId>dinky-flink-1.14</artifactId>
<scope>${scope.runtime}</scope>
</dependency>

<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-client-1.15</artifactId>
Expand All @@ -105,6 +107,17 @@
<artifactId>dinky-flink-1.16</artifactId>
<scope>${scope.runtime}</scope>
</dependency>

<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-client-1.17</artifactId>
<scope>${scope.runtime}</scope>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-flink-1.17</artifactId>
<scope>${scope.runtime}</scope>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down
1 change: 1 addition & 0 deletions dinky-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<module>dinky-app-1.14</module>
<module>dinky-app-1.15</module>
<module>dinky-app-1.16</module>
<module>dinky-app-1.17</module>
</modules>
</profile>

Expand Down
9 changes: 8 additions & 1 deletion dinky-assembly/src/main/assembly/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@
<include>dinky-client-1.16-${project.version}.jar</include>
</includes>
</fileSet>

<fileSet>
<directory>${project.parent.basedir}/build/extends/</directory>
<outputDirectory>plugins/flink1.17</outputDirectory>
<includes>
<include>dinky-catalog-mysql-1.17-${project.version}.jar</include>
<include>dinky-client-1.17-${project.version}.jar</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.parent.basedir}/build/extends/</directory>
<outputDirectory>plugins</outputDirectory>
Expand Down
45 changes: 45 additions & 0 deletions dinky-catalog/dinky-catalog-mysql/dinky-catalog-mysql-1.17/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<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.dinky</groupId>
<artifactId>dinky-catalog-mysql</artifactId>
<version>0.8.0</version>
</parent>
<artifactId>dinky-catalog-mysql-1.17</artifactId>

<packaging>jar</packaging>

<name>Dinky : Catalog : Mysql 1.17</name>

<dependencies>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-common</artifactId>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-flink-1.17</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- 指定打包的jar包输出路径 -->
<outputDirectory>${project.parent.parent.parent.basedir}/build/extends</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 2a59585

Please sign in to comment.