Skip to content

Commit

Permalink
sync zh
Browse files Browse the repository at this point in the history
  • Loading branch information
GOODBOY008 committed Mar 7, 2024
1 parent 960c32c commit 6331461
Show file tree
Hide file tree
Showing 30 changed files with 682 additions and 406 deletions.
16 changes: 13 additions & 3 deletions docs/content.zh/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@ specific language governing permissions and limitations
under the License.
-->

# Flink CDC: Apache Flink CDC
####

CDC Connectors for Apache Flink<sup>®</sup> is a set of source connectors for Apache Flink<sup>®</sup>, ingesting changes from different databases using change data capture (CDC).
CDC Connectors for Apache Flink<sup>®</sup> integrates Debezium as the engine to capture data changes. So it can fully leverage the ability of Debezium. See more about what is [Debezium](https://github.com/debezium/debezium).
<div style="text-align: center">
<h1>
Flink CDC: Change Data Capture Solution Of Apache Flink
</h1>
<h4 style="color: #696969">Set of source connectors for Apache Flink® directly ingesting changes coming from different databases using Change Data Capture(CDC).</h4>
</div>

Flink CDC integrates Debezium as the engine to capture data changes. So it can fully leverage the ability of Debezium. See more about what is [Debezium](https://github.com/debezium/debezium).

{{< img src="/fig/cdc-flow.png" alt="Stateful Functions" width="50%" >}}

Flink CDC supports ingesting snapshot data and real time changes from databases to Flink® and then transform and sink to various downstream systems.

{{< columns >}}
## Try Flink CDC
Expand Down
2 changes: 1 addition & 1 deletion docs/content.zh/docs/connectors/cdc-connectors/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: CDC Connectors
bookCollapseSection: true
weight: 1
weight: 2
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
Expand Down
9 changes: 1 addition & 8 deletions docs/content.zh/docs/connectors/cdc-connectors/db2-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,7 @@ using a build automation tool (such as Maven or SBT) and SQL Client with SQL JAR

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-db2-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-db2-cdc >}}

### SQL Client JAR

Expand Down
10 changes: 2 additions & 8 deletions docs/content.zh/docs/connectors/cdc-connectors/mongodb-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ Dependencies
In order to setup the MongoDB CDC connector, the following table provides dependency information for both projects using a build automation tool (such as Maven or SBT) and SQL Client with SQL JAR bundles.

### Maven dependency
```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-mongodb-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```

{{< artifact flink-connector-mongodb-cdc >}}

### SQL Client JAR

Expand Down
9 changes: 1 addition & 8 deletions docs/content.zh/docs/connectors/cdc-connectors/mysql-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,7 @@ In order to setup the MySQL CDC connector, the following table provides dependen

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-mysql-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-mysql-cdc >}}

### SQL Client JAR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@ Dependencies

In order to set up the OceanBase CDC connector, the following table provides dependency information for both projects using a build automation tool (such as Maven or SBT) and SQL Client with SQL JAR bundles.

```xml
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-oceanbase-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-oceanbase-cdc >}}

If you want to use OceanBase JDBC driver to connect to the enterprise edition database, you should also include the following dependency in your class path.

Expand Down
105 changes: 5 additions & 100 deletions docs/content.zh/docs/connectors/cdc-connectors/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ under the License.
CDC Connectors for Apache Flink<sup>®</sup> is a set of source connectors for <a href="https://flink.apache.org/">Apache Flink<sup>®</sup></a>, ingesting changes from different databases using change data capture (CDC).
The CDC Connectors for Apache Flink<sup>®</sup> integrate Debezium as the engine to capture data changes. So it can fully leverage the ability of Debezium. See more about what is [Debezium](https://github.com/debezium/debezium).

{{< img src="/fig/flinkcdc.png" width="600px" alt="Flink CDC" >}}
{{< img src="/fig/cdc-flow.png" width="600px" alt="Flink CDC" >}}

## Supported Connectors

| Connector | Database | Driver |
|-------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
| Connector | Database | Driver |
|-----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
| [mongodb-cdc](mongodb-cdc.md) | <li> [MongoDB](https://www.mongodb.com): 3.6, 4.x, 5.0 | MongoDB Driver: 4.3.4 |
| [mysql-cdc](mysql-cdc.md) | <li> [MySQL](https://dev.mysql.com/doc): 5.6, 5.7, 8.0.x <li> [RDS MySQL](https://www.aliyun.com/product/rds/mysql): 5.6, 5.7, 8.0.x <li> [PolarDB MySQL](https://www.aliyun.com/product/polardb): 5.6, 5.7, 8.0.x <li> [Aurora MySQL](https://aws.amazon.com/cn/rds/aurora): 5.6, 5.7, 8.0.x <li> [MariaDB](https://mariadb.org): 10.x <li> [PolarDB X](https://github.com/ApsaraDB/galaxysql): 2.0.1 | JDBC Driver: 8.0.28 |
| [oceanbase-cdc](oceanbase-cdc.md) | <li> [OceanBase CE](https://open.oceanbase.com): 3.1.x, 4.x <li> [OceanBase EE](https://www.oceanbase.com/product/oceanbase): 2.x, 3.x, 4.x | OceanBase Driver: 2.4.x |
Expand Down Expand Up @@ -70,8 +70,8 @@ The following table shows the version mapping between Flink<sup>®</sup> CDC Con

The following table shows the current features of the connector:

| Connector | No-lock Read | Parallel Read | Exactly-once Read | Incremental Snapshot Read |
|-------------------------------------------------|--------------|---------------|-------------------|---------------------------|
| Connector | No-lock Read | Parallel Read | Exactly-once Read | Incremental Snapshot Read |
|-----------------------------------|--------------|---------------|-------------------|---------------------------|
| [mongodb-cdc](mongodb-cdc.md) |||||
| [mysql-cdc](mysql-cdc.md) |||||
| [oracle-cdc](oracle-cdc.md) |||||
Expand Down Expand Up @@ -304,99 +304,4 @@ you can construct `JsonDebeziumDeserializationSchema` as following:
new JsonDebeziumDeserializationSchema(true, customConverterConfigs);
```

## Building from source

Prerequisites:
- git
- Maven
- At least Java 8

```
git clone https://github.org/apache/flink/flink-cdc-connectors.git
cd flink-cdc-connectors
mvn clean install -DskipTests
```

The dependencies are now available in your local `.m2` repository.

### Code Contribute

1. Left comment under the issue that you want to take
2. Fork Flink CDC project to your GitHub repositories
{{< img src="/fig/contribute_guidance/fork.png" width="600px" alt="fork" >}}
3. Clone and compile your Flink CDC project
```bash
git clone https://github.com/your_name/flink-cdc-connectors.git
cd flink-cdc-connectors
mvn clean install -DskipTests
```
4. Check to a new branch and start your work
```bash
git checkout -b my_feature
-- develop and commit
```
{{< img src="/fig/contribute_guidance/check_branch.png" width="600px" alt="check_branch" >}}
5. Push your branch to your GitHub
```bash
git push origin my_feature
```
6. Open a PR to https://github.org/apache/flink/flink-cdc-connectors
{{< img src="/fig/contribute_guidance/open_pr.png" width="600px" alt="open_pr" >}}

### Code Style

#### Code Formatting

You need to install the google-java-format plugin. Spotless together with google-java-format is used to format the codes.

It is recommended to automatically format your code by applying the following settings:

1. Go to "Settings""Other Settings""google-java-format Settings".
2. Tick the checkbox to enable the plugin.
3. Change the code style to "Android Open Source Project (AOSP) style".
4. Go to "Settings""Tools""Actions on Save".
5. Under "Formatting Actions", select "Optimize imports" and "Reformat file".
6. From the "All file types list" next to "Reformat code", select "Java".
For earlier IntelliJ IDEA versions, the step 4 to 7 will be changed as follows.
- 4.Go to "Settings""Other Settings""Save Actions".
- 5.Under "General", enable your preferred settings for when to format the code, e.g. "Activate save actions on save".
- 6.Under "Formatting Actions", select "Optimize imports" and "Reformat file".
- 7.Under "File Path Inclusions", add an entry for `.*\.java` to avoid formatting other file types.
Then the whole project could be formatted by command `mvn spotless:apply`.
#### Checkstyle
Checkstyle is used to enforce static coding guidelines.
1. Go to "Settings""Tools""Checkstyle".
2. Set "Scan Scope" to "Only Java sources (including tests)".
3. For "Checkstyle Version" select "8.14".
4. Under "Configuration File" click the "+" icon to add a new configuration.
5. Set "Description" to "Flink cdc".
6. Select "Use a local Checkstyle file" and link it to the file `tools/maven/checkstyle.xml` which is located within your cloned repository.
7. Select "Store relative to project location" and click "Next".
8. Configure the property `checkstyle.suppressions.file` with the value `suppressions.xml` and click "Next".
9. Click "Finish".
10. Select "Flink cdc" as the only active configuration file and click "Apply".
You can now import the Checkstyle configuration for the Java code formatter.
1. Go to "Settings""Editor""Code Style""Java".
2. Click the gear icon next to "Scheme" and select "Import Scheme""Checkstyle Configuration".
3. Navigate to and select `tools/maven/checkstyle.xml` located within your cloned repository.
Then you could click "View""Tool Windows""Checkstyle" and find the "Check Module" button in the opened tool window to validate checkstyle. Or you can use the command `mvn clean compile checkstyle:checkstyle` to validate.
### Documentation Contribute
Flink cdc documentations locates at `docs/content`.
The contribution step is the same as the code contribution. We use markdown as the source code of the document.
## License
The code in this repository is licensed under the [Apache Software License 2](https://github.org/apache/flink/flink-cdc-connectors/blob/master/LICENSE).
{{< top >}}
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ In order to setup the Postgres CDC connector, the following table provides depen

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-postgres-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-postgres-cdc >}}

### SQL Client JAR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ In order to setup the SQLServer CDC connector, the following table provides depe

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-sqlserver-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-sqlserver-cdc >}}

### SQL Client JAR

Expand Down
9 changes: 1 addition & 8 deletions docs/content.zh/docs/connectors/cdc-connectors/tidb-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@ In order to setup the TiDB CDC connector, the following table provides dependenc

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-tidb-cdc</artifactId>
<!-- The dependency is available only for stable releases, SNAPSHOT dependencies need to be built based on master or release branches by yourself. -->
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-tidb-cdc >}}

### SQL Client JAR

Expand Down
8 changes: 1 addition & 7 deletions docs/content.zh/docs/connectors/cdc-connectors/vitess-cdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ In order to setup the Vitess CDC connector, the following table provides depende

### Maven dependency

```
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-vitess-cdc</artifactId>
<version>3.0-SNAPSHOT</version>
</dependency>
```
{{< artifact flink-connector-vitess-cdc >}}

### SQL Client JAR

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Pipeline Connectors
bookCollapseSection: true
weight: 2
weight: 1
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This article introduces of Doris Pipeline Connector
```yaml
source:
type: values
name:ValuesSource
name: ValuesSource

sink:
type: doris
Expand Down
Loading

0 comments on commit 6331461

Please sign in to comment.