I'm trying to create a table whit flink's table API that uses a Debezium source function, I found an implementation of these functions here https://github.com/ververica/flink-cdc-connectors, and used them like this on my code:
val debeziumProperties = new Properties()
debeziumProperties.setProperty("plugin.name", "wal2json")
debeziumProperties.setProperty("format", "debezium-json")
val sourceFunction: DebeziumSourceFunction[TestCharge] = PostgreSQLSource.builder()
.hostname("******")
.port(5432)
.database("*****") // monitor all tables under inventory database
.username("*****")
.password("*****")
.debeziumProperties(debeziumProperties)
.deserializer(new CustomDebeziumDeserializer) // converts SourceRecord to String
.build()
val env = StreamExecutionEnvironment.getExecutionEnvironment
val sSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inStreamingMode().build()
val sTableEnv = StreamTableEnvironment.create(env, sSettings)
val cdcStream: DataStream[TestCharge] = env
.addSource(sourceFunction)
.map(x => x)
sTableEnv.createTemporaryView("historic", cdcStream, 'chargeId, 'email, 'amount, 'cardHash)
val table: Table = sTableEnv.sqlQuery("SELECT SUM(amount) FROM historic GROUP BY chargeId")
val reverse = sTableEnv.toRetractStream[Row](table)
reverse.print()
I also added this dependency as described on documentation:
"com.alibaba.ververica" % "flink-sql-connector-postgres-cdc" % "1.1.0"
When I try to run my job locally on mini-cluster it works fine, but in a Flink cluster that is provisioned on Kubernetes it gives me this exception:
Caused by: io.debezium.DebeziumException: No implementation of Debezium engine builder was found
Has anyone know what could be happening or if I'm missing some dependency?
Thanks in advance.