This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 5dc333c [pulsar-io]Add document for canal (#3664)
5dc333c is described below
commit 5dc333caef6830350638274fa9d34903f377998e
Author: tuteng <[email protected]>
AuthorDate: Sat Feb 23 11:54:12 2019 +0800
[pulsar-io]Add document for canal (#3664)
---
site2/docs/io-cdc-canal.md | 174 +++++++++++++++++++++
site2/docs/{io-cdc.md => io-cdc-debezium.md} | 16 +-
site2/docs/io-cdc.md | 140 +----------------
.../versioned_docs/version-2.3.0/io-cdc-canal.md | 174 +++++++++++++++++++++
.../version-2.3.0/io-cdc-debezium.md} | 16 +-
.../website/versioned_docs/version-2.3.0/io-cdc.md | 16 ++
.../versioned_docs/version-2.3.0/io-connectors.md | 2 +-
7 files changed, 378 insertions(+), 160 deletions(-)
diff --git a/site2/docs/io-cdc-canal.md b/site2/docs/io-cdc-canal.md
new file mode 100644
index 0000000..f388c1e
--- /dev/null
+++ b/site2/docs/io-cdc-canal.md
@@ -0,0 +1,174 @@
+---
+id: io-cdc-canal
+title: CDC Canal Connector
+sidebar_label: CDC Canal Connector
+---
+
+### Source Configuration Options
+
+The Configuration is mostly related to Canal task config.
+
+| Name | Required | Default | Description |
+|------|----------|---------|-------------|
+| `zkServers` | `false` | `127.0.0.1:2181` | `The address and port of the
zookeeper . if canal server configured to cluster mode` |
+| `batchSize` | `true` | `5120` | `Take 5120 records from the canal server in
batches` |
+| `username` | `false` | `` | `Canal server account, not MySQL` |
+| `password` | `false` | `` | `Canal server password, not MySQL` |
+| `cluster` | `false` | `false` | `Decide whether to open cluster mode based
on canal server configuration, true: cluster mode, false: standalone mode` |
+| `singleHostname` | `false` | `127.0.0.1` | `The address of canal server` |
+| `singlePort` | `false` | `11111` | `The port of canal server` |
+
+
+### Configuration Example
+
+Here is a configuration Json example:
+
+```$json
+{
+ "zkServers": "127.0.0.1:2181",
+ "batchSize": "5120",
+ "destination": "example",
+ "username": "",
+ "password": "",
+ "cluster": false,
+ "singleHostname": "127.0.0.1",
+ "singlePort": "11111",
+}
+```
+You could also find the yaml example in this
[file](https://github.com/apache/pulsar/blob/master/pulsar-io/canal/src/main/resources/canal-mysql-source-config.yaml),
which has similar content below:
+
+```$yaml
+configs:
+ zkServers: "127.0.0.1:2181"
+ batchSize: "5120"
+ destination: "example"
+ username: ""
+ password: ""
+ cluster: false
+ singleHostname: "127.0.0.1"
+ singlePort: "11111"
+```
+
+### Usage example
+
+Here is a simple example to store MySQL change data using above example config.
+
+- Start a MySQL server
+
+```$bash
+docker pull mysql:5.7
+docker run -d -it --rm --name pulsar-mysql -p 3306:3306 -e
MYSQL_ROOT_PASSWORD=canal -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw
mysql:5.7
+```
+- Modify configuration files mysqld.cnf
+
+```
+[mysqld]
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+#log-error = /var/log/mysql/error.log
+# By default we only accept connections from localhost
+#bind-address = 127.0.0.1
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
+log-bin=mysql-bin
+binlog-format=ROW
+server_id=1
+```
+
+- Copy file to mysql server from local and restart mysql server
+```$bash
+docker cp mysqld.cnf pulsar-mysql:/etc/mysql/mysql.conf.d/
+docker restart pulsar-mysql
+```
+
+- Create test database in mysql server
+```$bash
+docker exec -it pulsar-mysql /bin/bash
+mysql -h 127.0.0.1 -uroot -pcanal -e 'create database test;'
+```
+
+- Start canal server and connect mysql server
+
+```
+docker pull canal/canal-server:v1.1.2
+docker run -d -it --link pulsar-mysql -e canal.auto.scan=false -e
canal.destinations=test -e canal.instance.master.address=pulsar-mysql:3306 -e
canal.instance.dbUsername=root -e canal.instance.dbPassword=canal -e
canal.instance.connectionCharset=UTF-8 -e canal.instance.tsdb.enable=true -e
canal.instance.gtidon=false --name=pulsar-canal-server -p 8000:8000 -p
2222:2222 -p 11111:11111 -p 11112:11112 -m 4096m canal/canal-server:v1.1.2
+```
+
+- Start pulsar standalone
+
+```$bash
+docker pull apachepulsar/pulsar:2.3.0
+docker run -d -it --link pulsar-canal-server -p 6650:6650 -p 8080:8080 -v
$PWD/data:/pulsar/data --name pulsar-standalone apachepulsar/pulsar:2.3.0
bin/pulsar standalone
+```
+
+- Start pulsar-io in standalone
+
+- Config file canal-mysql-source-config.yaml
+
+```$yaml
+configs:
+ zkServers: ""
+ batchSize: "5120"
+ destination: "test"
+ username: ""
+ password: ""
+ cluster: false
+ singleHostname: "pulsar-canal-server"
+ singlePort: "11111"
+```
+- Consumer file pulsar-client.py for test
+```
+import pulsar
+
+client = pulsar.Client('pulsar://localhost:6650')
+consumer = client.subscribe('my-topic',
+ subscription_name='my-sub')
+
+while True:
+ msg = consumer.receive()
+ print("Received message: '%s'" % msg.data())
+ consumer.acknowledge(msg)
+
+client.close()
+```
+
+- Copy config file and test file to pulsar server
+
+```$bash
+docker cp canal-mysql-source-config.yaml pulsar-standalone:/pulsar/conf/
+docker cp pulsar-client.py pulsar-standalone:/pulsar/
+```
+
+- Download canal connector and start canal connector
+```$bash
+docker exec -it pulsar-standalone /bin/bash
+wget
http://apache.01link.hk/pulsar/pulsar-2.3.0/connectors/pulsar-io-canal-2.3.0.nar
-P connectors
+./bin/pulsar-admin source localrun --archive
./connectors/pulsar-io-canal-2.3.0.nar --classname
org.apache.pulsar.io.canal.CanalStringSource --tenant public --namespace
default --name canal --destination-topic-name my-topic --source-config-file
/pulsar/conf/canal-mysql-source-config.yaml --parallelism 1
+```
+
+- Consumption data
+
+```$bash
+docker exec -it pulsar-standalone /bin/bash
+python pulsar-client.py
+```
+
+- Open another window for login mysql server
+
+```$bash
+docker exec -it pulsar-mysql /bin/bash
+mysql -h 127.0.0.1 -uroot -pcanal
+```
+- Create table and insert, delete, update data in mysql server
+```
+mysql> use test;
+mysql> show tables;
+mysql> CREATE TABLE IF NOT EXISTS `test_table`(`test_id` INT UNSIGNED
AUTO_INCREMENT,`test_title` VARCHAR(100) NOT NULL,
+`test_author` VARCHAR(40) NOT NULL,
+`test_date` DATE,PRIMARY KEY ( `test_id` ))ENGINE=InnoDB DEFAULT CHARSET=utf8;
+mysql> INSERT INTO test_table (test_title, test_author, test_date) VALUES("a",
"b", NOW());
+mysql> UPDATE test_table SET test_title='c' WHERE test_title='a';
+mysql> DELETE FROM test_table WHERE test_title='c';
+```
+
diff --git a/site2/docs/io-cdc.md b/site2/docs/io-cdc-debezium.md
similarity index 89%
copy from site2/docs/io-cdc.md
copy to site2/docs/io-cdc-debezium.md
index 197fc11..f296f2d 100644
--- a/site2/docs/io-cdc.md
+++ b/site2/docs/io-cdc-debezium.md
@@ -1,17 +1,9 @@
---
-id: io-cdc
-title: CDC Connector
-sidebar_label: CDC Connector
+id: io-cdc-debezium
+title: CDC Debezium Connector
+sidebar_label: CDC Debezium Connector
---
-## Source
-
-The CDC Source connector is used to capture change log of existing databases
like MySQL, MongoDB, PostgreSQL into Pulsar.
-
-The CDC Source connector is built on top of [Debezium](https://debezium.io/).
This connector stores all data into Pulsar Cluster in a persistent, replicated
and partitioned way.
-This CDC Source are tested by using MySQL, and you could get more information
regarding how it works at [this
link](https://debezium.io/docs/connectors/mysql/).
-Regarding how Debezium works, please reference to [Debezium
tutorial](https://debezium.io/docs/tutorial/). It is recommended that you go
through this tutorial first.
-
### Source Configuration Options
The Configuration is mostly related to Debezium task config, besides this we
should provides the service URL of Pulsar cluster, and topic names that used to
store offset and history.
@@ -143,4 +135,4 @@ mysql> UPDATE products SET name='1111111111' WHERE id=101;
mysql> UPDATE products SET name='1111111111' WHERE id=107;
```
-- In above subscribe topic terminal tab, we could find that 2 changes has been
kept into products topic.
+- In above subscribe topic terminal tab, we could find that 2 changes has been
kept into products topic.
\ No newline at end of file
diff --git a/site2/docs/io-cdc.md b/site2/docs/io-cdc.md
index 197fc11..13b70ed 100644
--- a/site2/docs/io-cdc.md
+++ b/site2/docs/io-cdc.md
@@ -8,139 +8,9 @@ sidebar_label: CDC Connector
The CDC Source connector is used to capture change log of existing databases
like MySQL, MongoDB, PostgreSQL into Pulsar.
-The CDC Source connector is built on top of [Debezium](https://debezium.io/).
This connector stores all data into Pulsar Cluster in a persistent, replicated
and partitioned way.
-This CDC Source are tested by using MySQL, and you could get more information
regarding how it works at [this
link](https://debezium.io/docs/connectors/mysql/).
-Regarding how Debezium works, please reference to [Debezium
tutorial](https://debezium.io/docs/tutorial/). It is recommended that you go
through this tutorial first.
+The CDC Source connector is built on top of [Debezium](https://debezium.io/)
and [Canal](https://github.com/alibaba/canal). This connector stores all data
into Pulsar Cluster in a persistent, replicated and partitioned way.
+This CDC Source are tested by using MySQL, and you could get more information
regarding how it works at [this debezium
link](https://debezium.io/docs/connectors/mysql/) or [this canal
link](https://github.com/alibaba/canal/wiki).
+Regarding how Debezium works, please reference to [Debezium
tutorial](https://debezium.io/docs/tutorial/). Regarding how Canal works,
please reference to [Canal tutorial](https://github.com/alibaba/canal/wiki). It
is recommended that you go through this tutorial first.
-### Source Configuration Options
-
-The Configuration is mostly related to Debezium task config, besides this we
should provides the service URL of Pulsar cluster, and topic names that used to
store offset and history.
-
-| Name | Required | Default | Description |
-|------|----------|---------|-------------|
-| `task.class` | `true` | `null` | A source task class that implemented in
Debezium. |
-| `database.hostname` | `true` | `null` | The address of the Database server. |
-| `database.port` | `true` | `null` | The port number of the Database server..
|
-| `database.user` | `true` | `null` | The name of the Database user that has
the required privileges. |
-| `database.password` | `true` | `null` | The password for the Database user
that has the required privileges. |
-| `database.server.id` | `true` | `null` | The connector’s identifier that
must be unique within the Database cluster and similar to Database’s server-id
configuration property. |
-| `database.server.name` | `true` | `null` | The logical name of the Database
server/cluster, which forms a namespace and is used in all the names of the
Kafka topics to which the connector writes, the Kafka Connect schema names, and
the namespaces of the corresponding Avro schema when the Avro Connector is
used. |
-| `database.whitelist` | `false` | `null` | A list of all databases hosted by
this server that this connector will monitor. This is optional, and there are
other properties for listing the databases and tables to include or exclude
from monitoring. |
-| `key.converter` | `true` | `null` | The converter provided by Kafka Connect
to convert record key. |
-| `value.converter` | `true` | `null` | The converter provided by Kafka
Connect to convert record value. |
-| `database.history` | `true` | `null` | The name of the database history
class name. |
-| `database.history.pulsar.topic` | `true` | `null` | The name of the database
history topic where the connector will write and recover DDL statements. This
topic is for internal use only and should not be used by consumers. |
-| `database.history.pulsar.service.url` | `true` | `null` | Pulsar cluster
service url for history topic. |
-| `pulsar.service.url` | `true` | `null` | Pulsar cluster service url. |
-| `offset.storage.topic` | `true` | `null` | Record the last committed offsets
that the connector successfully completed. |
-
-### Configuration Example
-
-Here is a configuration Json example:
-
-```$json
-{
- "tenant": "public",
- "namespace": "default",
- "name": "debezium-kafka-source",
- "className": "org.apache.pulsar.io.kafka.connect.KafkaConnectSource" ,
- "topicName": "kafka-connect-topic",
- "configs":
- {
- "task.class": "io.debezium.connector.mysql.MySqlConnectorTask",
- "database.hostname": "localhost",
- "database.port": "3306",
- "database.user": "debezium",
- "database.password": "dbz",
- "database.server.id": "184054",
- "database.server.name": "dbserver1",
- "database.whitelist": "inventory",
- "database.history":
"org.apache.pulsar.io.debezium.PulsarDatabaseHistory",
- "database.history.pulsar.topic": "history-topic",
- "database.history.pulsar.service.url": "pulsar://127.0.0.1:6650",
- "key.converter": "org.apache.kafka.connect.json.JsonConverter",
- "value.converter": "org.apache.kafka.connect.json.JsonConverter",
- "pulsar.service.url": "pulsar://127.0.0.1:6650",
- "offset.storage.topic": "offset-topic"
- },
- "archive": "connectors/pulsar-io-kafka-connect-adaptor-2.3.0-SNAPSHOT.nar"
-}
-```
-
-You could also find the yaml example in this
[file](https://github.com/apache/pulsar/blob/master/pulsar-io/kafka-connect-adaptor/src/main/resources/debezium-mysql-source-config.yaml),
which has similar content below:
-
-```$yaml
-tenant: "public"
-namespace: "default"
-name: "debezium-kafka-source"
-topicName: "kafka-connect-topic"
-archive: "connectors/pulsar-io-kafka-connect-adaptor-2.3.0-SNAPSHOT.nar"
-
-##autoAck: true
-parallelism: 1
-
-configs:
- ## sourceTask
- task.class: "io.debezium.connector.mysql.MySqlConnectorTask"
-
- ## config for mysql, docker image: debezium/example-mysql:0.8
- database.hostname: "localhost"
- database.port: "3306"
- database.user: "debezium"
- database.password: "dbz"
- database.server.id: "184054"
- database.server.name: "dbserver1"
- database.whitelist: "inventory"
-
- database.history: "org.apache.pulsar.io.debezium.PulsarDatabaseHistory"
- database.history.pulsar.topic: "history-topic"
- database.history.pulsar.service.url: "pulsar://127.0.0.1:6650"
- ## KEY_CONVERTER_CLASS_CONFIG, VALUE_CONVERTER_CLASS_CONFIG
- key.converter: "org.apache.kafka.connect.json.JsonConverter"
- value.converter: "org.apache.kafka.connect.json.JsonConverter"
- ## PULSAR_SERVICE_URL_CONFIG
- pulsar.service.url: "pulsar://127.0.0.1:6650"
- ## OFFSET_STORAGE_TOPIC_CONFIG
- offset.storage.topic: "offset-topic"
-```
-
-### Usage example
-
-Here is a simple example to store MySQL change data using above example config.
-
-- Start a MySQL server with an example database, from which Debezium can
capture changes.
-```$bash
- docker run -it --rm --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=debezium
-e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw debezium/example-mysql:0.8
-```
-
-- Start a Pulsar service locally in standalone mode.
-```$bash
- bin/pulsar standalone
-```
-
-- Start pulsar debezium connector, with local run mode, and using above yaml
config file. Please make sure that the nar file is available as configured in
path `connectors/pulsar-io-kafka-connect-adaptor-2.3.0-SNAPSHOT.nar`.
-```$bash
- bin/pulsar-admin source localrun --sourceConfigFile
debezium-mysql-source-config.yaml
-```
-
-- Subscribe the topic for table `inventory.products`.
-```
- bin/pulsar-client consume -s "sub-products"
public/default/dbserver1.inventory.products -n 0
-```
-
-- start a MySQL cli docker connector, and use it we could change to the table
`products` in MySQL server.
-```$bash
-$docker run -it --rm --name mysqlterm --link mysql --rm mysql:5.7 sh -c 'exec
mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot
-p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
-```
-
-This command will pop out MySQL cli, in this cli, we could do a change in
table products, use commands below to change the name of 2 items in table
products:
-
-```
-mysql> use inventory;
-mysql> show tables;
-mysql> SELECT * FROM products ;
-mysql> UPDATE products SET name='1111111111' WHERE id=101;
-mysql> UPDATE products SET name='1111111111' WHERE id=107;
-```
-
-- In above subscribe topic terminal tab, we could find that 2 changes has been
kept into products topic.
+- [Debezium Connector](io-cdc-debezium.md)
+- [Alibaba Canal Connector](io-cdc-canal.md)
\ No newline at end of file
diff --git a/site2/website/versioned_docs/version-2.3.0/io-cdc-canal.md
b/site2/website/versioned_docs/version-2.3.0/io-cdc-canal.md
new file mode 100644
index 0000000..f388c1e
--- /dev/null
+++ b/site2/website/versioned_docs/version-2.3.0/io-cdc-canal.md
@@ -0,0 +1,174 @@
+---
+id: io-cdc-canal
+title: CDC Canal Connector
+sidebar_label: CDC Canal Connector
+---
+
+### Source Configuration Options
+
+The Configuration is mostly related to Canal task config.
+
+| Name | Required | Default | Description |
+|------|----------|---------|-------------|
+| `zkServers` | `false` | `127.0.0.1:2181` | `The address and port of the
zookeeper . if canal server configured to cluster mode` |
+| `batchSize` | `true` | `5120` | `Take 5120 records from the canal server in
batches` |
+| `username` | `false` | `` | `Canal server account, not MySQL` |
+| `password` | `false` | `` | `Canal server password, not MySQL` |
+| `cluster` | `false` | `false` | `Decide whether to open cluster mode based
on canal server configuration, true: cluster mode, false: standalone mode` |
+| `singleHostname` | `false` | `127.0.0.1` | `The address of canal server` |
+| `singlePort` | `false` | `11111` | `The port of canal server` |
+
+
+### Configuration Example
+
+Here is a configuration Json example:
+
+```$json
+{
+ "zkServers": "127.0.0.1:2181",
+ "batchSize": "5120",
+ "destination": "example",
+ "username": "",
+ "password": "",
+ "cluster": false,
+ "singleHostname": "127.0.0.1",
+ "singlePort": "11111",
+}
+```
+You could also find the yaml example in this
[file](https://github.com/apache/pulsar/blob/master/pulsar-io/canal/src/main/resources/canal-mysql-source-config.yaml),
which has similar content below:
+
+```$yaml
+configs:
+ zkServers: "127.0.0.1:2181"
+ batchSize: "5120"
+ destination: "example"
+ username: ""
+ password: ""
+ cluster: false
+ singleHostname: "127.0.0.1"
+ singlePort: "11111"
+```
+
+### Usage example
+
+Here is a simple example to store MySQL change data using above example config.
+
+- Start a MySQL server
+
+```$bash
+docker pull mysql:5.7
+docker run -d -it --rm --name pulsar-mysql -p 3306:3306 -e
MYSQL_ROOT_PASSWORD=canal -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw
mysql:5.7
+```
+- Modify configuration files mysqld.cnf
+
+```
+[mysqld]
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+datadir = /var/lib/mysql
+#log-error = /var/log/mysql/error.log
+# By default we only accept connections from localhost
+#bind-address = 127.0.0.1
+# Disabling symbolic-links is recommended to prevent assorted security risks
+symbolic-links=0
+log-bin=mysql-bin
+binlog-format=ROW
+server_id=1
+```
+
+- Copy file to mysql server from local and restart mysql server
+```$bash
+docker cp mysqld.cnf pulsar-mysql:/etc/mysql/mysql.conf.d/
+docker restart pulsar-mysql
+```
+
+- Create test database in mysql server
+```$bash
+docker exec -it pulsar-mysql /bin/bash
+mysql -h 127.0.0.1 -uroot -pcanal -e 'create database test;'
+```
+
+- Start canal server and connect mysql server
+
+```
+docker pull canal/canal-server:v1.1.2
+docker run -d -it --link pulsar-mysql -e canal.auto.scan=false -e
canal.destinations=test -e canal.instance.master.address=pulsar-mysql:3306 -e
canal.instance.dbUsername=root -e canal.instance.dbPassword=canal -e
canal.instance.connectionCharset=UTF-8 -e canal.instance.tsdb.enable=true -e
canal.instance.gtidon=false --name=pulsar-canal-server -p 8000:8000 -p
2222:2222 -p 11111:11111 -p 11112:11112 -m 4096m canal/canal-server:v1.1.2
+```
+
+- Start pulsar standalone
+
+```$bash
+docker pull apachepulsar/pulsar:2.3.0
+docker run -d -it --link pulsar-canal-server -p 6650:6650 -p 8080:8080 -v
$PWD/data:/pulsar/data --name pulsar-standalone apachepulsar/pulsar:2.3.0
bin/pulsar standalone
+```
+
+- Start pulsar-io in standalone
+
+- Config file canal-mysql-source-config.yaml
+
+```$yaml
+configs:
+ zkServers: ""
+ batchSize: "5120"
+ destination: "test"
+ username: ""
+ password: ""
+ cluster: false
+ singleHostname: "pulsar-canal-server"
+ singlePort: "11111"
+```
+- Consumer file pulsar-client.py for test
+```
+import pulsar
+
+client = pulsar.Client('pulsar://localhost:6650')
+consumer = client.subscribe('my-topic',
+ subscription_name='my-sub')
+
+while True:
+ msg = consumer.receive()
+ print("Received message: '%s'" % msg.data())
+ consumer.acknowledge(msg)
+
+client.close()
+```
+
+- Copy config file and test file to pulsar server
+
+```$bash
+docker cp canal-mysql-source-config.yaml pulsar-standalone:/pulsar/conf/
+docker cp pulsar-client.py pulsar-standalone:/pulsar/
+```
+
+- Download canal connector and start canal connector
+```$bash
+docker exec -it pulsar-standalone /bin/bash
+wget
http://apache.01link.hk/pulsar/pulsar-2.3.0/connectors/pulsar-io-canal-2.3.0.nar
-P connectors
+./bin/pulsar-admin source localrun --archive
./connectors/pulsar-io-canal-2.3.0.nar --classname
org.apache.pulsar.io.canal.CanalStringSource --tenant public --namespace
default --name canal --destination-topic-name my-topic --source-config-file
/pulsar/conf/canal-mysql-source-config.yaml --parallelism 1
+```
+
+- Consumption data
+
+```$bash
+docker exec -it pulsar-standalone /bin/bash
+python pulsar-client.py
+```
+
+- Open another window for login mysql server
+
+```$bash
+docker exec -it pulsar-mysql /bin/bash
+mysql -h 127.0.0.1 -uroot -pcanal
+```
+- Create table and insert, delete, update data in mysql server
+```
+mysql> use test;
+mysql> show tables;
+mysql> CREATE TABLE IF NOT EXISTS `test_table`(`test_id` INT UNSIGNED
AUTO_INCREMENT,`test_title` VARCHAR(100) NOT NULL,
+`test_author` VARCHAR(40) NOT NULL,
+`test_date` DATE,PRIMARY KEY ( `test_id` ))ENGINE=InnoDB DEFAULT CHARSET=utf8;
+mysql> INSERT INTO test_table (test_title, test_author, test_date) VALUES("a",
"b", NOW());
+mysql> UPDATE test_table SET test_title='c' WHERE test_title='a';
+mysql> DELETE FROM test_table WHERE test_title='c';
+```
+
diff --git a/site2/docs/io-cdc.md
b/site2/website/versioned_docs/version-2.3.0/io-cdc-debezium.md
similarity index 89%
copy from site2/docs/io-cdc.md
copy to site2/website/versioned_docs/version-2.3.0/io-cdc-debezium.md
index 197fc11..f296f2d 100644
--- a/site2/docs/io-cdc.md
+++ b/site2/website/versioned_docs/version-2.3.0/io-cdc-debezium.md
@@ -1,17 +1,9 @@
---
-id: io-cdc
-title: CDC Connector
-sidebar_label: CDC Connector
+id: io-cdc-debezium
+title: CDC Debezium Connector
+sidebar_label: CDC Debezium Connector
---
-## Source
-
-The CDC Source connector is used to capture change log of existing databases
like MySQL, MongoDB, PostgreSQL into Pulsar.
-
-The CDC Source connector is built on top of [Debezium](https://debezium.io/).
This connector stores all data into Pulsar Cluster in a persistent, replicated
and partitioned way.
-This CDC Source are tested by using MySQL, and you could get more information
regarding how it works at [this
link](https://debezium.io/docs/connectors/mysql/).
-Regarding how Debezium works, please reference to [Debezium
tutorial](https://debezium.io/docs/tutorial/). It is recommended that you go
through this tutorial first.
-
### Source Configuration Options
The Configuration is mostly related to Debezium task config, besides this we
should provides the service URL of Pulsar cluster, and topic names that used to
store offset and history.
@@ -143,4 +135,4 @@ mysql> UPDATE products SET name='1111111111' WHERE id=101;
mysql> UPDATE products SET name='1111111111' WHERE id=107;
```
-- In above subscribe topic terminal tab, we could find that 2 changes has been
kept into products topic.
+- In above subscribe topic terminal tab, we could find that 2 changes has been
kept into products topic.
\ No newline at end of file
diff --git a/site2/website/versioned_docs/version-2.3.0/io-cdc.md
b/site2/website/versioned_docs/version-2.3.0/io-cdc.md
new file mode 100644
index 0000000..13b70ed
--- /dev/null
+++ b/site2/website/versioned_docs/version-2.3.0/io-cdc.md
@@ -0,0 +1,16 @@
+---
+id: io-cdc
+title: CDC Connector
+sidebar_label: CDC Connector
+---
+
+## Source
+
+The CDC Source connector is used to capture change log of existing databases
like MySQL, MongoDB, PostgreSQL into Pulsar.
+
+The CDC Source connector is built on top of [Debezium](https://debezium.io/)
and [Canal](https://github.com/alibaba/canal). This connector stores all data
into Pulsar Cluster in a persistent, replicated and partitioned way.
+This CDC Source are tested by using MySQL, and you could get more information
regarding how it works at [this debezium
link](https://debezium.io/docs/connectors/mysql/) or [this canal
link](https://github.com/alibaba/canal/wiki).
+Regarding how Debezium works, please reference to [Debezium
tutorial](https://debezium.io/docs/tutorial/). Regarding how Canal works,
please reference to [Canal tutorial](https://github.com/alibaba/canal/wiki). It
is recommended that you go through this tutorial first.
+
+- [Debezium Connector](io-cdc-debezium.md)
+- [Alibaba Canal Connector](io-cdc-canal.md)
\ No newline at end of file
diff --git a/site2/website/versioned_docs/version-2.3.0/io-connectors.md
b/site2/website/versioned_docs/version-2.3.0/io-connectors.md
index 0005fde..1f6845a 100644
--- a/site2/website/versioned_docs/version-2.3.0/io-connectors.md
+++ b/site2/website/versioned_docs/version-2.3.0/io-connectors.md
@@ -17,6 +17,6 @@ Pulsar Functions cluster.
- [Kinesis Sink Connector](io-kinesis.md#sink)
- [RabbitMQ Source Connector](io-rabbitmq.md#source)
- [Twitter Firehose Source Connector](io-twitter.md)
-- [CDC Source Connector based on Debezium](io-cdc.md)
+- [CDC Source Connector based on Debezium and Canal](io-cdc.md)
- [Netty Source Connector](io-netty.md#source)
- [Hbase Sink Connector](io-hbase.md#sink)