Created
March 21, 2017 22:02
-
-
Save dasl-/ce091a3df4277c5117f2fdf783dc5ce0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/run.sh b/run.sh | |
index 248ca9c..4e5cf03 100755 | |
--- a/run.sh | |
+++ b/run.sh | |
@@ -117,6 +117,8 @@ for d in $all_mysqlds; do | |
./workspace/mysql/bin/mysql -uroot -proot --protocol=tcp -P${listen_port[$d]} -e "set sql_log_bin=0; USE etsy_index" | |
./workspace/mysql/bin/mysql -uroot -proot --protocol=tcp -P${listen_port[$d]} -e "set sql_log_bin=0; CREATE TABLE etsy_index.test (k int primary key, v1 tinyint default '1', v2 int null, v3 int null default '3', v4 int not null default '4', v5 int not null)" | |
./workspace/mysql/bin/mysql -uroot -proot --protocol=tcp -P${listen_port[$d]} -e "set sql_log_bin=0; CREATE TABLE etsy_index.test2 (k int primary key, v1 tinyint default '1', v2 int null, v3 int null default '3', v4 int not null default '4', v5 int not null)" | |
+ | |
+ ./workspace/mysql/bin/mysql -uroot -proot --protocol=tcp -P${listen_port[$d]} -e "set sql_log_bin=0; CREATE TABLE test.test (k int primary key, v varchar(32))" | |
done | |
# Get the mysql server UUIDs | |
@@ -183,7 +185,25 @@ done | |
# Start debezium | |
info "Starting debezium..." | |
curl -f -m5 -v -i -H "Accept:application/json" -H "Content-Type:application/json" localhost:40003/connectors \ | |
- -d "{ \"name\": \"test-connector\", \"config\": { \"producer.batch.size\": 0, \"connector.class\": \"io.debezium.connector.mysql.MySqlConnector\", \"tasks.max\": \"1\", \"database.hostname\": \"localhost\", \"database.port\": \"${listen_port[c]}\", \"database.user\": \"root\", \"database.password\": \"root\", \"database.server.name\": \"localhost\", \"database.history.kafka.bootstrap.servers\": \"localhost:40001\", \"database.history.kafka.topic\": \"test\", \"database.mysql.expect_metadata_events\": true, \"snapshot.mode\": \"twitter_patch\", \"topic.mapper\": \"io.debezium.relational.topic.ByLogicalTableTopicMapper\", \"gtid.source.includes\": \"${mysqld_uuid[a]}\" } }" | |
+ -d '{ | |
+ "name": "test-connector", | |
+ "config": { | |
+ "producer.batch.size": 0, | |
+ "connector.class": "io.debezium.connector.mysql.MySqlConnector", | |
+ "tasks.max": "1", | |
+ "database.hostname": "localhost", | |
+ "database.port": "'"${listen_port[c]}"'", | |
+ "database.user": "root", | |
+ "database.password": "root", | |
+ "database.server.name": "localhost", | |
+ "database.history.kafka.bootstrap.servers": "localhost:40001", | |
+ "database.history.kafka.topic": "test", | |
+ "database.mysql.expect_metadata_events": true, | |
+ "snapshot.mode": "never", | |
+ "gtid.source.includes": "'"${mysqld_uuid[a]}"'", | |
+ "database.server.id": 2001 | |
+ } | |
+ }' | |
[ $? -eq 0 ] || die "Debezium init failed" | |
# Wait for debezium to connect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment