Hi everyone :wave:, I am trying to use flink cdc a...
# troubleshooting
s
Hi everyone 👋, I am trying to use flink cdc and following this example largely but with a change of datasource as postgresql instead of mysql. But my iceberg table sink is not getting updated at all and don't see any errors in jobmanager or taskmanager. Here are my configurations I've used following dependencies
Copy code
flink-shaded-hadoop-2-uber-2.7.5-10.0.jar
flink-sql-connector-postgres-cdc-3.0.0.jar
iceberg-flink-runtime-1.16-1.3.1.jar
Tables
Copy code
CREATE TABLE bookings_source (
    `book_ref` STRING,
    `book_date` TIMESTAMP,
    `total_amount` DECIMAL(20, 0),
    PRIMARY KEY (`book_ref`) NOT ENFORCED
  ) WITH (
    'connector' = 'postgres-cdc',
    'hostname' = 'postgres',
    'port' = '5432',
    'username' = 'postgres',
    'password' = 'postgres',
    'database-name' = 'demo',
    'table-name' = 'bookings',
    'schema-name' = 'bookings',
    'slot.name' = 'flink'
  );
CREATE CATALOG iceberg_catalog WITH (
    'type'='iceberg', 
    'catalog-type'='hadoop',  
    'warehouse'='file:///tmp/iceberg/warehouse/'
);
CREATE TABLE bookings_sink (
    `book_ref`    STRING,
    `book_date`     TIMESTAMP,
    `total_amount`  DECIMAL(20, 0),
    PRIMARY KEY (`book_ref`) NOT ENFORCED
  ) WITH (
    'connector'='iceberg',
    'catalog-name'='iceberg_catalog',
    'catalog-type'='hadoop',  
    'warehouse'='file:///tmp/iceberg/warehouse/',
    'format-version'='2'
  );
INSERT INTO bookings_sink select * from bookings_source;
Second Problem : Additionally I want to update iceberg table sink to google cloud file system. I tried placing
flink-gs-fs-hadoop-1.16.0.jar
in plugins directly and updated warehouse setting in sink and catalog configuration but it gives me this error
Copy code
[ERROR] Could not execute SQL statement. Reason:
java.io.IOException: No FileSystem for scheme: gs
a
Hi
my iceberg table sink is not getting updated at all and don’t see any errors in jobmanager or taskmanager.
Do you have checkpoints enabled and can you see completed checkpoints in Flink dashboard?
I tried placing
flink-gs-fs-hadoop-1.16.0.jar
in plugins directly and updated warehouse setting in sink and catalog configuration but it gives me this error
Have you placed it at
<flink path>/plugins/flink-gs-fs-hadoop-1.16.0.jar
or similar to
<flink path>/plugins/flink-gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jar
?
s
Do you have checkpoints enabled and can you see completed checkpoints in Flink dashboard?
I don't have checkpoints enabled. I tried now using below command but seems didn't work.
Copy code
SET 'state.checkpoints.dir' = 'file:////tmp/';
SET 'execution.checkpointing.mode' = 'EXACTLY_ONCE';
SET 'execution.checkpointing.interval' = '30sec';
SET 'execution.checkpointing.prefer-checkpoint-for-recovery' = 'true';
Have you placed it at
<flink path>/plugins/flink-gs-fs-hadoop-1.16.0.jar
or similar to
<flink path>/plugins/flink-gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jar
?
Yes and it is
/opt/flink/plugins/gs-fs-hadoop/flink-gs-fs-hadoop-1.16.0.jar
a
I don’t have checkpoints enabled.
Iceberg writes data only during checkpointing. So in order to write data to your destination ensure that checkpoints are enabled.
✅ 1