You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ji...@apache.org on 2023/01/17 02:56:25 UTC
[rocketmq-site] branch new-official-website updated: [ISSUE #381]Translation for "数据集成-RocketMQ Connect实战2" Section in the v4.x & 5.0 Document (CN -> EN) (#445)
This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch new-official-website
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git
The following commit(s) were added to refs/heads/new-official-website by this push:
new d6dff6634 [ISSUE #381]Translation for "数据集成-RocketMQ Connect实战2" Section in the v4.x & 5.0 Document (CN -> EN) (#445)
d6dff6634 is described below
commit d6dff66344c97ab698c1169b57d9a38be4d02457
Author: mxsm <lj...@gmail.com>
AuthorDate: Tue Jan 17 10:56:19 2023 +0800
[ISSUE #381]Translation for "数据集成-RocketMQ Connect实战2" Section in the v4.x & 5.0 Document (CN -> EN) (#445)
* [ISSUE #381]Translation for "数据集成-RocketMQ Connect实战2" Section in the v4.x & 5.0 Document (CN -> EN)
* polish document
---
.../29RocketMQ Connect In Action2.md" | 100 ++++++++++----------
.../29RocketMQ Connect In Action2.md" | 101 +++++++++++----------
2 files changed, 108 insertions(+), 93 deletions(-)
diff --git "a/i18n/en/docusaurus-plugin-content-docs/current/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md" "b/i18n/en/docusaurus-plugin-content-docs/current/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
index 4f3ae9848..f7fd8efec 100644
--- "a/i18n/en/docusaurus-plugin-content-docs/current/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
+++ "b/i18n/en/docusaurus-plugin-content-docs/current/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
@@ -1,37 +1,39 @@
-# RocketMQ Connect实战2
+# RocketMQ Connect in Action 2
PostgreSQL Source(CDC) - >RocketMQ Connect -> MySQL Sink(JDBC)
-## 准备
+## Preparation
-### 启动RocketMQ
+### Start RocketMQ
1. Linux/Unix/Mac
2. 64bit JDK 1.8+;
-3. Maven 3.2.x或以上版本;
-4. 启动 [RocketMQ](https://rocketmq.apache.org/docs/quick-start/);
+3. Maven 3.2.x+;
+4. Start [RocketMQ](https://rocketmq.apache.org/docs/quick-start/);
-**tips** : ${ROCKETMQ_HOME} 位置说明
+**tips** : ${ROCKETMQ_HOME} locational instructions
->bin-release.zip 版本:/rocketmq-all-4.9.4-bin-release
+>bin-release.zip version:/rocketmq-all-4.9.4-bin-release
>
->source-release.zip 版本:/rocketmq-all-4.9.4-source-release/distribution
+>source-release.zip version:/rocketmq-all-4.9.4-source-release/distribution
-### 启动Connect
+### Start Connect
-#### Connector插件编译
+#### Compiling Connector Plugin
Debezium RocketMQ Connector
+
```
$ cd rocketmq-connect/connectors/rocketmq-connect-debezium/
$ mvn clean package -Dmaven.test.skip=true
```
-将 Debezium PostgreSQL RocketMQ Connector 编译好的包放入Runtime加载目录。命令如下:
+Move the compiled Debezium PostgreSQL RocketMQ Connector package into the Runtime loading directory. The command is as follows :
+
```
mkdir -p /usr/local/connector-plugins
cp rocketmq-connect-debezium-postgresql/target/rocketmq-connect-debezium-postgresql-0.0.1-SNAPSHOT-jar-with-dependencies.jar /usr/local/connector-plugins
@@ -39,7 +41,8 @@ cp rocketmq-connect-debezium-postgresql/target/rocketmq-connect-debezium-postgre
JDBC Connector
-将 JDBC Connector 编译好的包放入Runtime加载目录。命令如下:
+Move the compiled JDBC Connector package into the Runtime loading directory. The command is as follows:
+
```
$ cd rocketmq-connect/connectors/rocketmq-connect-jdbc/
$ mvn clean package -Dmaven.test.skip=true
@@ -47,7 +50,7 @@ cp rocketmq-connect-jdbc/target/rocketmq-connect-jdbc-0.0.1-SNAPSHOT-jar-with-de
```
-#### 启动Connect Runtime
+#### Start Connect Runtime
```
cd rocketmq-connect
@@ -56,7 +59,13 @@ mvn -Prelease-connect -DskipTests clean install -U
```
-修改配置`connect-standalone.conf` ,重点配置如下
+Modify the configuration `connect-standalone.conf`, the main configuration is as follows
+
+```shell
+$ cd distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT
+$ vim conf/connect-standalone.conf
+```
+
```
$ cd distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT
$ vim conf/connect-standalone.conf
@@ -80,7 +89,7 @@ secretKey=12345678
autoCreateGroupEnable=false
clusterName="DefaultCluster"
-# 核心配置,将之前编译好debezium包的插件目录配置在此;
+# Core configuration, configure the plugin directory of the previously compiled debezium package here
# Source or sink connector jar file dir,The default value is rocketmq-connect-sample
pluginPaths=/usr/local/connector-plugins
```
@@ -93,9 +102,10 @@ sh bin/connect-standalone.sh -c conf/connect-standalone.conf &
```
-### Postgres镜像
+### Postgres image
+
+Use debezium's Postgres docker environment to set up the Postgres database
-使用debezium的Postgres docker搭建环境MySQL数据库
```
# starting a pg instance
docker run -d --name postgres -p 5432:5432 -e POSTGRES_USER=start_data_engineer -e POSTGRES_PASSWORD=password debezium/postgres:14
@@ -103,31 +113,33 @@ docker run -d --name postgres -p 5432:5432 -e POSTGRES_USER=start_data_engineer
# bash into postgres instance
docker exec -ti postgres /bin/bash
```
-Postgres信息
-端口:5432
-账号:start_data_engineer/password
-同步的源数据库:bank.holding
-目标库:bank1.holding
-### MySQL镜像
+Postgres information
+Port:5432
+Aaccount:start_data_engineer/password
+Synchronize original database:bank.holding
+Target database table:bank1.holding
+
+### MySQL image
+
+Use debezium's MySQL docker environment to set up the MySQL database.
-使用debezium的MySQL docker搭建环境MySQL数据库
```
docker run -it --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw quay.io/debezium/example-mysql:1.9
```
-MySQL信息
+MySQL information
-端口:3306
+Port:3306
-账号:root/debezium
+Account:root/debezium
-### 测试数据
+### Test data
-通过start_data_engineer/password账号登录数据库
+Log in to the database with the start_data_engineer/password account
-源数据库表:bank.holding
+Source database table:bank.holding
```
CREATE SCHEMA bank;
@@ -151,7 +163,8 @@ update bank.holding set holding_quantity = 300 where holding_id=1000;
```
-目标表:bank1.holding
+Target database table:bank1.holding
+
```
create database bank1;
CREATE TABLE holding (
@@ -166,12 +179,12 @@ CREATE TABLE holding (
```
-## 启动Connector
+## Start Connector
-### 启动Debezium source connector
+### Start Debezium source connector
-同步原表数据:bank.holding
-作用:通过解析Postgres binlog 封装成通用的ConnectRecord对象,发送的RocketMQ Topic当中
+Synchronize original table data:bank.holding
+Purpose: Parse Postgres binlog and encapsulate it into a common ConnectRecord object, which is sent to the RocketMQ Topic.
```
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connectors/postgres-connector -d '{
@@ -185,7 +198,7 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
"database.history.skip.unparseable.ddl": true,
"database.server.name": "bankserver1",
"database.port": 5432,
- "database.hostname": "数据库ip",
+ "database.hostname": "database ip",
"database.connectionTimeZone": "UTC",
"database.user": "start_data_engineer",
"database.dbname": "start_data_engineer",
@@ -196,16 +209,16 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
}'
```
-### 启动 jdbc sink connector
+### Start JDBC sink connector
-作用:通过消费Topic中的数据,通过JDBC协议写入到目标表当中
+Purpose: Consume data from the Topic and write it to the target table through JDBC protocol.
```
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connectors/jdbcmysqlsinktest201 -d '{
"connector.class": "org.apache.rocketmq.connect.jdbc.connector.JdbcSinkConnector",
"max.task": "2",
"connect.topicnames": "debezium-postgres-source-01",
- "connection.url": "jdbc:mysql://数据库ip:3306/bank1",
+ "connection.url": "jdbc:mysql://database ip:3306/bank1",
"connection.user": "root",
"connection.password": "debezium",
"pk.fields": "holding_id",
@@ -224,11 +237,6 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
```
-以上两个Connector任务创建成功以后
-通过start_data_engineer/password账号登录数据库
-账号登录数据库
-
-对源数据库表:bankholding增删改
-即可同步到目标表bank1.holding
-
+After the creation of the above two Connector tasks, log in to the database using the start_data_engineer/password account.
+Any add, delete, or modification made to the source database table `bankholding` will be synced to the target table `bank1.holding`.
diff --git "a/i18n/en/docusaurus-plugin-content-docs/version-5.0/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md" "b/i18n/en/docusaurus-plugin-content-docs/version-5.0/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
index 4f3ae9848..690b4e63b 100644
--- "a/i18n/en/docusaurus-plugin-content-docs/version-5.0/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
+++ "b/i18n/en/docusaurus-plugin-content-docs/version-5.0/08-\346\225\260\346\215\256\351\233\206\346\210\220/29RocketMQ Connect In Action2.md"
@@ -1,37 +1,37 @@
-# RocketMQ Connect实战2
+# RocketMQ Connect in Action 2
PostgreSQL Source(CDC) - >RocketMQ Connect -> MySQL Sink(JDBC)
-## 准备
+## Preparation
-### 启动RocketMQ
+### Start RocketMQ
1. Linux/Unix/Mac
2. 64bit JDK 1.8+;
-3. Maven 3.2.x或以上版本;
-4. 启动 [RocketMQ](https://rocketmq.apache.org/docs/quick-start/);
+3. Maven 3.2.x+;
+4. Start [RocketMQ](https://rocketmq.apache.org/docs/quick-start/);
+**tips** : ${ROCKETMQ_HOME} locational instructions
-
-**tips** : ${ROCKETMQ_HOME} 位置说明
-
->bin-release.zip 版本:/rocketmq-all-4.9.4-bin-release
+>bin-release.zip version:/rocketmq-all-4.9.4-bin-release
>
->source-release.zip 版本:/rocketmq-all-4.9.4-source-release/distribution
+>source-release.zip version:/rocketmq-all-4.9.4-source-release/distribution
-### 启动Connect
+### Start Connect
-#### Connector插件编译
+#### Compiling Connector Plugin
Debezium RocketMQ Connector
+
```
$ cd rocketmq-connect/connectors/rocketmq-connect-debezium/
$ mvn clean package -Dmaven.test.skip=true
```
-将 Debezium PostgreSQL RocketMQ Connector 编译好的包放入Runtime加载目录。命令如下:
+Move the compiled Debezium PostgreSQL RocketMQ Connector package into the Runtime loading directory. The command is as follows :
+
```
mkdir -p /usr/local/connector-plugins
cp rocketmq-connect-debezium-postgresql/target/rocketmq-connect-debezium-postgresql-0.0.1-SNAPSHOT-jar-with-dependencies.jar /usr/local/connector-plugins
@@ -39,7 +39,8 @@ cp rocketmq-connect-debezium-postgresql/target/rocketmq-connect-debezium-postgre
JDBC Connector
-将 JDBC Connector 编译好的包放入Runtime加载目录。命令如下:
+Move the compiled JDBC Connector package into the Runtime loading directory. The command is as follows:
+
```
$ cd rocketmq-connect/connectors/rocketmq-connect-jdbc/
$ mvn clean package -Dmaven.test.skip=true
@@ -47,7 +48,7 @@ cp rocketmq-connect-jdbc/target/rocketmq-connect-jdbc-0.0.1-SNAPSHOT-jar-with-de
```
-#### 启动Connect Runtime
+#### Start Connect Runtime
```
cd rocketmq-connect
@@ -56,7 +57,13 @@ mvn -Prelease-connect -DskipTests clean install -U
```
-修改配置`connect-standalone.conf` ,重点配置如下
+Modify the configuration `connect-standalone.conf`, the main configuration is as follows
+
+```shell
+$ cd distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT
+$ vim conf/connect-standalone.conf
+```
+
```
$ cd distribution/target/rocketmq-connect-0.0.1-SNAPSHOT/rocketmq-connect-0.0.1-SNAPSHOT
$ vim conf/connect-standalone.conf
@@ -80,7 +87,7 @@ secretKey=12345678
autoCreateGroupEnable=false
clusterName="DefaultCluster"
-# 核心配置,将之前编译好debezium包的插件目录配置在此;
+# Core configuration, configure the plugin directory of the previously compiled debezium package here
# Source or sink connector jar file dir,The default value is rocketmq-connect-sample
pluginPaths=/usr/local/connector-plugins
```
@@ -93,9 +100,10 @@ sh bin/connect-standalone.sh -c conf/connect-standalone.conf &
```
-### Postgres镜像
+### Postgres image
+
+Use debezium's Postgres docker environment to set up the Postgres database
-使用debezium的Postgres docker搭建环境MySQL数据库
```
# starting a pg instance
docker run -d --name postgres -p 5432:5432 -e POSTGRES_USER=start_data_engineer -e POSTGRES_PASSWORD=password debezium/postgres:14
@@ -103,31 +111,33 @@ docker run -d --name postgres -p 5432:5432 -e POSTGRES_USER=start_data_engineer
# bash into postgres instance
docker exec -ti postgres /bin/bash
```
-Postgres信息
-端口:5432
-账号:start_data_engineer/password
-同步的源数据库:bank.holding
-目标库:bank1.holding
-### MySQL镜像
+Postgres information
+Port:5432
+Aaccount:start_data_engineer/password
+Synchronize original database:bank.holding
+Target database table:bank1.holding
+
+### MySQL image
+
+Use debezium's MySQL docker environment to set up the MySQL database.
-使用debezium的MySQL docker搭建环境MySQL数据库
```
docker run -it --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw quay.io/debezium/example-mysql:1.9
```
-MySQL信息
+MySQL information
-端口:3306
+Port:3306
-账号:root/debezium
+Account:root/debezium
-### 测试数据
+### Test data
-通过start_data_engineer/password账号登录数据库
+Log in to the database with the start_data_engineer/password account
-源数据库表:bank.holding
+Source database table:bank.holding
```
CREATE SCHEMA bank;
@@ -151,7 +161,8 @@ update bank.holding set holding_quantity = 300 where holding_id=1000;
```
-目标表:bank1.holding
+Target database table:bank1.holding
+
```
create database bank1;
CREATE TABLE holding (
@@ -166,12 +177,12 @@ CREATE TABLE holding (
```
-## 启动Connector
+## Start Connector
-### 启动Debezium source connector
+### Start Debezium source connector
-同步原表数据:bank.holding
-作用:通过解析Postgres binlog 封装成通用的ConnectRecord对象,发送的RocketMQ Topic当中
+Synchronize original table data:bank.holding
+Purpose: Parse Postgres binlog and encapsulate it into a common ConnectRecord object, which is sent to the RocketMQ Topic.
```
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connectors/postgres-connector -d '{
@@ -185,7 +196,7 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
"database.history.skip.unparseable.ddl": true,
"database.server.name": "bankserver1",
"database.port": 5432,
- "database.hostname": "数据库ip",
+ "database.hostname": "database ip",
"database.connectionTimeZone": "UTC",
"database.user": "start_data_engineer",
"database.dbname": "start_data_engineer",
@@ -196,16 +207,16 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
}'
```
-### 启动 jdbc sink connector
+### Start JDBC sink connector
-作用:通过消费Topic中的数据,通过JDBC协议写入到目标表当中
+Purpose: Consume data from the Topic and write it to the target table through JDBC protocol.
```
curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connectors/jdbcmysqlsinktest201 -d '{
"connector.class": "org.apache.rocketmq.connect.jdbc.connector.JdbcSinkConnector",
"max.task": "2",
"connect.topicnames": "debezium-postgres-source-01",
- "connection.url": "jdbc:mysql://数据库ip:3306/bank1",
+ "connection.url": "jdbc:mysql://database ip:3306/bank1",
"connection.user": "root",
"connection.password": "debezium",
"pk.fields": "holding_id",
@@ -224,11 +235,7 @@ curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8082/connector
```
-以上两个Connector任务创建成功以后
-通过start_data_engineer/password账号登录数据库
-账号登录数据库
-
-对源数据库表:bankholding增删改
-即可同步到目标表bank1.holding
+After the creation of the above two Connector tasks, log in to the database using the start_data_engineer/password account.
+Any add, delete, or modification made to the source database table `bankholding` will be synced to the target table `bank1.holding`.