我使用 debezium cdc connect pg,我构建了 docker 使用的 pg 11?pg 运行良好。当我在 kafka 连接器中使用 debezium 时?它报告?
无法获得数据库测试的编码
卷曲是:
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST http://localhost:8083/connectors/ -d '{
"name": "debezium",
"config": {
"name": "debezium",
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"database.hostname": "localhost",
"database.port": "5432",
"database.dbname": "test",
"database.user": "pg",
"database.password": "135790",
"database.server.name": "ls",
"table.whitelist": "public.test",
"plugin.name": "pgoutput"
}
}'
Run Code Online (Sandbox Code Playgroud)
卡夫卡例外是:
[2020-07-08 09:24:35,076] ERROR Uncaught exception in REST call to /connectors/ (org.apache.kafka.connect.runtime.rest.errors.ConnectExceptionMapper:61)
java.lang.RuntimeException: Couldn't obtain encoding for database test
at io.debezium.connector.postgresql.connection.PostgresConnection.determineDatabaseCharset(PostgresConnection.java:434)
at io.debezium.connector.postgresql.connection.PostgresConnection.<init>(PostgresConnection.java:77)
at …Run Code Online (Sandbox Code Playgroud) 我们知道在 Spark 中有三种类型的连接——广播连接?随机加入和排序合并加入?
两个大表的join,join key无法排序的情况怎么办?Spark 会选择哪种连接类型?