Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cdc] paimon cdc support snapshot mode #4164

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

MOBIN-F
Copy link
Contributor

@MOBIN-F MOBIN-F commented Sep 10, 2024

Purpose

Currently paimon cdc does not support scan.startup.mode=snapshot, but flink-cdc 3.x(mysql、pg、mongdb cdc) already supports shapshot mode
image

Tests

API and Format

Documentation

@MOBIN-F MOBIN-F changed the title [cdc] paimon cdc support snaphost mode [cdc] paimon cdc support snapshot mode Sep 10, 2024
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit f9164e4 into apache:master Sep 11, 2024
10 checks passed
wxplovecc pushed a commit to tongcheng-elong/incubator-paimon that referenced this pull request Sep 11, 2024
@LinMingQiang
Copy link
Contributor

Why MysqlSource can't finish when i set -Dexecution.runtime-mode=BATCH .

If in scan.startup.mode=snapshot mode , 'execution.runtime-mode' should/can be Batch?

@LinMingQiang
Copy link
Contributor

LinMingQiang commented Sep 13, 2024

flink run -Dexecution.runtime-mode=BATCH \
paimon-flink-action-1.0-SNAPSHOT.jar \
mysql_sync_table \
--warehouse xxx \
--database local_database \
--table test_paimon_cdc_opt \
--mysql_conf hostname=localhost \
--mysql_conf username=root \
--mysql_conf password=123456789 \
--mysql_conf database-name=paimon \
--mysql_conf table-name=paimon_cdc_opt \
--mysql_conf scan.startup.mode=snapshot \
--table_conf bucket=10 \
--table_conf tag.automatic-creation=watermark \
--partition_keys dt \
--primary_keys dt,id \
--type-mapping char-to-string```

@LinMingQiang
Copy link
Contributor

Just 1 record in mysql. and operator ```Source: MySQL Source -> Parse -> Side Output```` will be never finish.

image

@MOBIN-F
Copy link
Contributor Author

MOBIN-F commented Sep 13, 2024

Why MysqlSource can't finish when i set -Dexecution.runtime-mode=BATCH .

If in scan.startup.mode=snapshot mode , 'execution.runtime-mode' should/can be Batch?

hi @LinMingQiang , no need to set the batch mode, the job will automatically complete and exit

2024-09-10 18:20:40,006 INFO  org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - Job MySQL-Paimon Table Sync: rt_ods.xxxx(d9998e2d7bfccd5d320fb4ac21761c3d) switched from state
 RUNNING to FINISHED.
-> 
2024-09-10 18:20:40,007 DEBUG org.apache.flink.runtime.executiongraph.ExecutionGraph       [] - ExecutionGraph d9998e2d7bfccd5d320fb4ac21761c3d reached terminal state FINISHED.
-> 
2024-09-10 18:20:40,343 INFO  org.apache.flink.runtime.entrypoint.ClusterEntrypoint        [] - Shutting YarnJobClusterEntrypoint down with application status SUCCEEDED. Diagnostics null.

@LinMingQiang
Copy link
Contributor

It is normal in mode streaming. My question is why can't I use batch mode?

@LinMingQiang
Copy link
Contributor

In addition, the job will not finish until checkpoint is triggered once in streaming mode.

@MOBIN-F
Copy link
Contributor Author

MOBIN-F commented Sep 13, 2024

@LinMingQiang See more details in discussion of #2867.

@LinMingQiang
Copy link
Contributor

I have reported the bug to cdc :

https://issues.apache.org/jira/browse/FLINK-36280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants