Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cdc version to 3.4-SNAPSHOT and add release-3.3 docs #3870

Merged
merged 8 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

FROM flink

ARG FLINK_CDC_VERSION=3.3-SNAPSHOT
ARG FLINK_CDC_VERSION=3.4-SNAPSHOT
ARG PIPELINE_DEFINITION_FILE

RUN mkdir -p /opt/flink-cdc
Expand Down
3 changes: 2 additions & 1 deletion docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ pygmentsUseClasses = true
]

PreviousDocs = [
["3.3", "https://nightlies.apache.org/flink/flink-cdc-docs-release-3.3"],
["3.2", "https://nightlies.apache.org/flink/flink-cdc-docs-release-3.2"],
["3.1", "https://nightlies.apache.org/flink/flink-cdc-docs-release-3.1"],
["3.1", "https://nightlies.apache.org/flink/flink-cdc-docs-release-3.1"]
]

[markup]
Expand Down
4 changes: 2 additions & 2 deletions docs/content.zh/docs/connectors/pipeline-connectors/doris.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pipeline:
<td>String</td>
<td>StreamLoad的参数。
For example: <code> sink.properties.strict_mode: true</code>.
查看更多关于 <a href="https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-statements/Data-Manipulation-Statements/Load/STREAM-LOAD/"> StreamLoad 的属性</a></td>
查看更多关于 <a href="https://doris.apache.org/zh-CN/docs/dev/data-operate/import/import-way/stream-load-manual"> StreamLoad 的属性</a></td>
</td>
</tr>
<tr>
Expand All @@ -179,7 +179,7 @@ pipeline:
<td>String</td>
<td>创建表的Properties配置。
For example: <code> table.create.properties.replication_num: 1</code>.
查看更多关于 <a href="https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE/"> Doris Table 的属性</a></td>
查看更多关于 <a href="https://doris.apache.org/zh-CN/docs/dev/sql-manual/sql-statements/table-and-view/table/CREATE-TABLE"> Doris Table 的属性</a></td>
</td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/connectors/pipeline-connectors/doris.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ pipeline:
<td>String</td>
<td> Parameters of StreamLoad.
For example: <code> sink.properties.strict_mode: true</code>.
See more about <a href="https://doris.apache.org/docs/dev/sql-manual/sql-statements/Data-Manipulation-Statements/Load/STREAM-LOAD/"> StreamLoad Properties</a></td>
See more about <a href="https://doris.apache.org/docs/dev/data-operate/import/import-way/stream-load-manual"> StreamLoad Properties</a></td>
</td>
</tr>
<tr>
Expand All @@ -179,7 +179,7 @@ pipeline:
<td>String</td>
<td>Create the Properties configuration of the table.
For example: <code> table.create.properties.replication_num: 1</code>.
See more about <a href="https://doris.apache.org/docs/dev/sql-manual/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE/"> Doris Table Properties</a></td>
See more about <a href="https://doris.apache.org/docs/dev/sql-manual/sql-statements/table-and-view/table/CREATE-TABLE"> Doris Table Properties</a></td>
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ limitations under the License.
</scm>

<properties>
<revision>3.3-SNAPSHOT</revision>
<revision>3.4-SNAPSHOT</revision>
<scala.binary.version>2.12</scala.binary.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Enforce single fork execution due to heavy mini cluster use in the tests -->
Expand Down
2 changes: 1 addition & 1 deletion tools/mig-test/datastream/compile_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

JOB_VERSIONS = %w[3.2.0 3.2.1 3.3-SNAPSHOT]
JOB_VERSIONS = %w[3.2.0 3.2.1 3.3.0 3.4-SNAPSHOT]

JOB_VERSIONS.each do |version|
puts "Compiling DataStream job for CDC #{version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ limitations under the License.

<groupId>org.apache.flink</groupId>
<artifactId>datastream-job</artifactId>
<version>3.3-SNAPSHOT</version>
<version>3.3.0</version>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flink.version>1.19.1</flink.version>
<flink.cdc.version>3.3-SNAPSHOT</flink.cdc.version>
<flink.cdc.version>3.3.0</flink.cdc.version>
<debezium.version>1.9.7.Final</debezium.version>
<scala.binary.version>2.12</scala.binary.version>
<slf4j.version>2.0.13</slf4j.version>
Expand Down
38 changes: 38 additions & 0 deletions tools/mig-test/datastream/datastream-3.4-SNAPSHOT/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
180 changes: 180 additions & 0 deletions tools/mig-test/datastream/datastream-3.4-SNAPSHOT/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<?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>

<groupId>org.apache.flink</groupId>
<artifactId>datastream-job</artifactId>
<version>3.4-SNAPSHOT</version>
<packaging>jar</packaging>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<flink.version>1.19.1</flink.version>
<flink.cdc.version>3.4-SNAPSHOT</flink.cdc.version>
<debezium.version>1.9.7.Final</debezium.version>
<scala.binary.version>2.12</scala.binary.version>
<slf4j.version>2.0.13</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-java</artifactId>
<version>${flink.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-clients</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-planner_${scala.binary.version}</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-runtime</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-core</artifactId>
<version>${flink.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-table-common</artifactId>
<version>${flink.version}</version>
</dependency>
<!-- Checked the dependencies of the Flink project and below is a feasible reference. -->
<!-- Use flink shaded guava 18.0-13.0 for flink 1.13 -->
<!-- Use flink shaded guava 30.1.1-jre-14.0 for flink-1.14 -->
<!-- Use flink shaded guava 30.1.1-jre-15.0 for flink-1.15 -->
<!-- Use flink shaded guava 30.1.1-jre-15.0 for flink-1.16 -->
<!-- Use flink shaded guava 30.1.1-jre-16.1 for flink-1.17 -->
<!-- Use flink shaded guava 31.1-jre-17.0 for flink-1.18 -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-guava</artifactId>
<version>31.1-jre-17.0</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-debezium</artifactId>
<version>${flink.cdc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cdc-base</artifactId>
<version>${flink.cdc.version}</version>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-mysql-cdc</artifactId>
<version>${flink.cdc.version}</version>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-connector-mysql</artifactId>
<version>${debezium.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java-8-target</id>
<activation>
<jdk>[1.8,11)</jdk>
</activation>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
</profile>
<profile>
<id>java-11-target</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<properties>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/*
* 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.
*/

import org.apache.flink.cdc.connectors.mysql.source.MySqlSource;
import org.apache.flink.cdc.connectors.mysql.table.StartupOptions;
import org.apache.flink.cdc.debezium.JsonDebeziumDeserializationSchema;
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class DataStreamJob {

public static void main(String[] args) {
MySqlSource<String> mySqlSource = MySqlSource.<String>builder()
.hostname("localhost")
.port(3306)
.databaseList("fallen")
.tableList("fallen.angel", "fallen.gabriel", "fallen.girl")
.startupOptions(StartupOptions.initial())
.username("root")
.password("")
.deserializer(new JsonDebeziumDeserializationSchema())
.serverTimeZone("UTC")
.build();

StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.enableCheckpointing(3000);

env.fromSource(mySqlSource, WatermarkStrategy.noWatermarks(), "MySQL CDC Source")
.uid("sql-source-uid")
.setParallelism(1)
.print()
.setParallelism(1);

try {
env.execute();
} catch (Exception e) {
// ... unfortunately
}
}
}
2 changes: 1 addition & 1 deletion tools/mig-test/datastream/run_migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_migration(from_version, to_version)
end
end

version_list = %w[3.2.0 3.2.1 3.3-SNAPSHOT]
version_list = %w[3.2.0 3.2.1 3.3.0 3.4-SNAPSHOT]
version_result = Hash.new('❓')
@failures = []

Expand Down
3 changes: 2 additions & 1 deletion tools/mig-test/prepare_libs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def gen_version(tag)
RELEASED_VERSIONS = {
'3.2.0': gen_version('3.2.0'),
'3.2.1': gen_version('3.2.1'),
'3.3.0': gen_version('3.3.0'),
}.freeze

HEAD_VERSION = '3.3-SNAPSHOT'
HEAD_VERSION = '3.4-SNAPSHOT'

def download_or_get(link)
`mkdir -p cache`
Expand Down
4 changes: 2 additions & 2 deletions tools/mig-test/run_migration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def test_migration(from_version, to_version)
end

version_list = case ARGV[0]
when '1.19.1' then %w[3.2.0 3.2.1 3.3-SNAPSHOT]
when '1.20.0' then %w[3.2.1 3.3-SNAPSHOT]
when '1.19.1' then %w[3.2.0 3.2.1 3.3.0 3.4-SNAPSHOT]
when '1.20.0' then %w[3.2.1 3.3.0 3.4-SNAPSHOT]
else []
end

Expand Down
Loading