#!/bin/bash
export FLINK_HOME=/opt/flink/flink-1.20.2
export PATH=$FLINK_HOME/bin:$PATH
${FLINK_HOME}/bin/flink run
-Dexecution.checkpointing.interval=10s
-Dparallelism.default=1
-c org.apache.doris.flink.tools.cdc.CdcTools
${FLINK_HOME}/lib/flink-doris-connector-1.20-24.0.1.jar
postgres-sync-database
--database test_database
--table-prefix ods_openmaint_
--postgres-conf hostname=172.20.16.114
--postgres-conf port=5432
--postgres-conf username=openmaint
--postgres-conf password="Honing@123"
--postgres-conf database-name=openmaint
--postgres-conf schema-name=public
--postgres-conf slot.name=flink_slot_openmaint
--postgres-conf decoding.plugin.name=pgoutput
--schema-change-mode sql_parser
--sink-conf fenodes=172.20.16.15:8030
--sink-conf username=root
--sink-conf password=Honing@123
--sink-conf jdbc-url="jdbc:mysql://172.20.16.15:9030?useSSL=false&serverTimezone=UTC"
--sink-conf sink.label-prefix=label1
--table-conf replication_num=1
--table-conf light_schema_change=true
Log 信息
org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: java.lang.UnsupportedOperationException: Unsupported Postgres Type: regclass in table: AccessControlDevice
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:373)
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:223)
at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:113)
at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:1026)
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:247)
at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1270)
at org.apache.flink.client.cli.CliFrontend.lambda$mainInternal$10(CliFrontend.java:1367)
at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
at org.apache.flink.client.cli.CliFrontend.mainInternal(CliFrontend.java:1367)
at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1335)
Caused by: java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException: Unsupported Postgres Type: regclass in table: AccessControlDevice
at org.apache.doris.flink.tools.cdc.JdbcSourceSchema.getColumnInfo(JdbcSourceSchema.java:75)
at org.apache.doris.flink.tools.cdc.JdbcSourceSchema.(JdbcSourceSchema.java:48)
at org.apache.doris.flink.tools.cdc.postgres.PostgresSchema.(PostgresSchema.java:33)
at org.apache.doris.flink.tools.cdc.postgres.PostgresDatabaseSync.getSchemaList(PostgresDatabaseSync.java:121)
at org.apache.doris.flink.tools.cdc.DatabaseSync.build(DatabaseSync.java:120)
at org.apache.doris.flink.tools.cdc.CdcTools.syncDatabase(CdcTools.java:175)
at org.apache.doris.flink.tools.cdc.CdcTools.createPostgresSyncDatabase(CdcTools.java:100)
at org.apache.doris.flink.tools.cdc.CdcTools.main(CdcTools.java:62)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:356)
... 9 more