Skip to content

Commit

Permalink
support flink1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Aug 13, 2024
1 parent 27bf18e commit 853f07c
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 9 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build-connector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,11 @@ jobs:
cd flink-doris-connector && mvn clean package \
-Dflink.version=1.19.0 \
-Dflink.minor.version=1.19 \
-Dflink.python.id=flink-python
-Dflink.python.id=flink-python
- name: Build flink connector 1.20
run: |
cd flink-doris-connector && mvn clean package \
-Dflink.version=1.20.0 \
-Dflink.minor.version=1.20 \
-Dflink.python.id=flink-python
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ under the License.

## Flink Doris Connector

Flink Doris Connector now support flink version from 1.11 to 1.19.
Flink Doris Connector now support flink version from 1.11 to 1.20.

If you wish to contribute or use a connector from flink 1.13 (and earlier), please use the [branch-for-flink-before-1.13](https://github.com/apache/doris-flink-connector/tree/branch-for-flink-before-1.13)

Expand Down
7 changes: 6 additions & 1 deletion flink-doris-connector/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ fi

selectFlink() {
echo 'Flink-Doris-Connector supports multiple versions of flink. Which version do you need ?'
select flink in "1.15.x" "1.16.x" "1.17.x" "1.18.x" "1.19.x"
select flink in "1.15.x" "1.16.x" "1.17.x" "1.18.x" "1.19.x" "1.20.x"
do
case $flink in
"1.15.x")
Expand All @@ -134,6 +134,9 @@ selectFlink() {
"1.19.x")
return 5
;;
"1.20.x")
return 6
;;
*)
echo "invalid selected, exit.."
exit 1
Expand All @@ -157,6 +160,8 @@ elif [ ${flinkVer} -eq 4 ]; then
FLINK_VERSION="1.18.0"
elif [ ${flinkVer} -eq 5 ]; then
FLINK_VERSION="1.19.0"
elif [ ${flinkVer} -eq 6 ]; then
FLINK_VERSION="1.20.0"
fi

# extract major version:
Expand Down
31 changes: 25 additions & 6 deletions flink-doris-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ under the License.
</mailingLists>

<properties>
<revision>1.6.2-SNAPSHOT</revision>
<revision>24.0.0-SNAPSHOT</revision>
<flink.version>1.18.0</flink.version>
<flink.major.version>1.18</flink.major.version>
<flink.sql.cdc.version>3.1.1</flink.sql.cdc.version>
Expand Down Expand Up @@ -95,6 +95,7 @@ under the License.
<jsqlparser.version>4.9</jsqlparser.version>
<mysql.driver.version>8.0.26</mysql.driver.version>
<ojdbc.version>19.3.0.0</ojdbc.version>
<log4j.version>2.17.1</log4j.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -225,17 +226,35 @@ under the License.
<artifactId>jackson-databind</artifactId>
<version>${fasterxml.version}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<!-- API bridge between log4j 1 and 2 -->
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<!-- use cdc bundled jar for kafka connect class-->
<dependency>
Expand Down
25 changes: 25 additions & 0 deletions flink-doris-connector/src/main/resources/log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
################################################################################
# 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.
################################################################################

rootLogger.level = INFO
rootLogger.appenderRef.console.ref = ConsoleAppender

appender.console.name = ConsoleAppender
appender.console.type = CONSOLE
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{HH:mm:ss,SSS} %-5p %-60c [%t] %x - %m%n
25 changes: 25 additions & 0 deletions flink-doris-connector/src/test/resources/log4j2-test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
################################################################################
# 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.
################################################################################

rootLogger.level = INFO
rootLogger.appenderRef.test.ref = TestLogger

appender.testlogger.name = TestLogger
appender.testlogger.type = CONSOLE
appender.testlogger.layout.type = PatternLayout
appender.testlogger.layout.pattern = %d{HH:mm:ss,SSS} %-5p %-60c [%t] %x - %m%n

0 comments on commit 853f07c

Please sign in to comment.