Skip to content

Commit

Permalink
[Feature][Flink] Added support for Flink 1.20 and updated dependencie…
Browse files Browse the repository at this point in the history
…s on other Flink versions (#3786)
  • Loading branch information
zackyoungh authored Sep 6, 2024
1 parent 948d350 commit 260932c
Show file tree
Hide file tree
Showing 49 changed files with 7,884 additions and 27 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/auto-realease-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,28 @@ jobs:
-Pprod,flink-single-version,flink-1.18,maven-central,web,fast \
--no-snapshot-updates
- name: "Build Dinky ${{ inputs.version }} with Fink 1.19 Pre Release/Release Artifact"
id: build_dinky1_19
run: |
./mvnw -B clean package \
-Dmaven.test.skip=false \
-Dspotless.check.skip=true \
-Denforcer.skip=false \
-Dmaven.javadoc.skip=true \
-Pprod,flink-single-version,flink-1.19,maven-central,web,fast \
--no-snapshot-updates
- name: "Build Dinky ${{ inputs.version }} with Fink 1.20 Pre Release/Release Artifact"
id: build_dinky1_20
run: |
./mvnw -B clean package \
-Dmaven.test.skip=false \
-Dspotless.check.skip=true \
-Denforcer.skip=false \
-Dmaven.javadoc.skip=true \
-Pprod,flink-single-version,flink-1.20,maven-central,web,fast \
--no-snapshot-updates
- name: Automatic Upload Releases to GitHub Releases Page
uses: "marvinpinto/action-automatic-releases@latest"
with:
Expand All @@ -120,4 +142,4 @@ jobs:
body: |
${{ inputs.release_notes }}
files: |
./build/dinky-release-*.tar.gz
./build/dinky-release-*.tar.gz
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.14, 1.15, 1.16, 1.17, 1.18, 1.19]
flink: [1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20]

timeout-minutes: 30
env:
Expand Down
76 changes: 76 additions & 0 deletions dinky-app/dinky-app-1.20/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>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>dinky-app-1.20</artifactId>

<packaging>jar</packaging>

<name>Dinky : App 1.20</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-1.20</artifactId>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-flink-1.20</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>
55 changes: 55 additions & 0 deletions dinky-app/dinky-app-1.20/src/main/java/org/dinky/app/MainApp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
*
* 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.constant.AppParamConstant;
import org.dinky.app.db.DBUtil;
import org.dinky.app.flinksql.Submitter;
import org.dinky.data.app.AppParamConfig;
import org.dinky.utils.JsonUtils;

import org.apache.flink.api.java.utils.ParameterTool;

import java.util.Base64;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

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

private static final Logger log = LoggerFactory.getLogger(Submitter.class);

public static void main(String[] args) throws Exception {
log.info("=========================Start run dinky app job===============================");
ParameterTool parameters = ParameterTool.fromArgs(args);
boolean isEncrypt = parameters.getBoolean(AppParamConstant.isEncrypt, true);
String config = parameters.get(AppParamConstant.config);
config = isEncrypt ? new String(Base64.getDecoder().decode(config)) : config;
AppParamConfig appConfig = JsonUtils.toJavaBean(config, AppParamConfig.class);
log.info("dinky app is Ready to run, config is {}", appConfig);
DBUtil.init(appConfig);
Submitter.submit(appConfig);
}
}
1 change: 1 addition & 0 deletions dinky-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<module>dinky-app-1.17</module>
<module>dinky-app-1.18</module>
<module>dinky-app-1.19</module>
<module>dinky-app-1.20</module>
</modules>
</profile>

Expand Down
46 changes: 46 additions & 0 deletions dinky-catalog/dinky-catalog-mysql/dinky-catalog-mysql-1.20/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?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>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>dinky-catalog-mysql-1.20</artifactId>

<packaging>jar</packaging>

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

<dependencies>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-common</artifactId>
</dependency>
<dependency>
<groupId>org.dinky</groupId>
<artifactId>dinky-flink-1.20</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 260932c

Please sign in to comment.