开发者社区 问答 正文

cdc如果想断点续传,应该怎么搞,有大佬有类似的经验吗?

cdc如果想断点续传,应该怎么搞,有大佬有类似的经验吗?

展开
收起
真的很搞笑 2023-04-19 18:37:52 199 分享 版权
1 条回答
写回答
取消 提交回答
  • CSDN全栈领域优质创作者,万粉博主;InfoQ签约博主;华为云享专家;华为Iot专家;亚马逊人工智能自动驾驶(大众组)吉尼斯世界纪录获得者

    要实现Flink CDC的断点续传,需要在Flink CDC的配置文件中设置checkpointingModeCheckpointingMode.EXACTLY_ONCE,并设置maxConcurrentSubtasks为1。这样,Flink CDC会每隔一段时间将数据写入Hudi表,并在发生故障时进行回滚。

    具体步骤如下:

    1. 在Flink CDC的配置文件中设置checkpointingModeCheckpointingMode.EXACTLY_ONCE,并设置maxConcurrentSubtasks为1。例如:
    flink:
      cdc:
        source:
          sql: SELECT * FROM my_table
          table-prefix: my_table
          database: my_database
          hive-conf:
            hive.exec.dynamic.partition.mode=nonstrict
        sink:
          hudi:
            path: hdfs://localhost:9000/user/hadoop/output/my_table
            database: my_database
            table-name: my_table
            write-mode:upsert
            max-commit-interval:60000
            max-history-size:50000
            max-batch-size:10000
            max-parallelism:1
            properties:
              hudi.write.precombine.field.list=id,timestamp,ts_col,ts_unit,ts_type,ts_extractor,ts_format,ts_zone,ts_is_local,ts_is_utc,ts_offset,ts_tod,ts_year,ts_month,ts_day,ts_hour,ts_minute,ts_second,ts_milliseconds,ts_nanos,other_col1,other_col2,other_col3,other_col4,other_col5,other_col6,other_col7,other_col8,other_col9,other_col10,other_col11,other_col12,other_col13,other_col14,other_col15,other_col16,other_col17,other_col18,other_col19,other_col20,other_col21,other_col22,other_col23,other_col24,other_col25,other_col26,other_col27,other_col28,other_col29,other_col30,other_col31,other_col32,other_col33,other_col34,other_col35,other_col36,other_col37,other_col38,other_col39,other_col40,other_col41,other_col42,other_col43,other_col44,other_col45,other_col46,other_col47,other_col48,other_col49,other
    2023-06-30 09:53:24
    赞同 展开评论