flink cdc DataStream api 时区问题

本文涉及的产品
RDS MySQL DuckDB 分析主实例,基础系列 4核8GB
RDS Agent(兼容OpenClaw),2核4GB
RDS AI 助手,专业版
简介: flink cdc DataStream api 时区问题

postgresql cdc时区问题

1:以postgrsql 作为数据源时,Date和timesatmp等类型cdc同步读出来时,会发现一下几个问题:

       时间,日期等类型的数据对应的会转化为Int,long等类型。

       源表同步后,时间相差8小时。这是因为时区不同的缘故。

源表:

60a6bcefe26f4b118e50f46e4d0afd1d.png

sink 表:

75f0e2306cfe4b549332ab598e15c984.png

解决方案:在自定义序列化时进行处理。

java code

package pg.cdc.ds;
import com.alibaba.fastjson.JSONObject;
import com.ververica.cdc.debezium.DebeziumDeserializationSchema;
import io.debezium.data.Envelope;
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.util.Collector;
import org.apache.kafka.connect.data.Field;
import org.apache.kafka.connect.data.Schema;
import org.apache.kafka.connect.data.Struct;
import org.apache.kafka.connect.source.SourceRecord;
import java.text.SimpleDateFormat;
import java.time.ZoneId;
import java.util.Date;
import java.util.List;
public class CustomerDeserialization implements DebeziumDeserializationSchema<String> {
    ZoneId serverTimeZone;
    @Override
    public void deserialize(SourceRecord sourceRecord, Collector<String> collector) throws Exception {
        //1.创建JSON对象用于存储最终数据
        JSONObject result = new JSONObject();
        Struct value = (Struct) sourceRecord.value();
        //2.获取库名&表名
        Struct sourceStruct = value.getStruct("source");
        String database = sourceStruct.getString("db");
        String schema = sourceStruct.getString("schema");
        String tableName = sourceStruct.getString("table");
        //3.获取"before"数据
        Struct before = value.getStruct("before");
        JSONObject beforeJson = new JSONObject();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
        if (before != null) {
            Schema beforeSchema = before.schema();
            List<Field> beforeFields = beforeSchema.fields();
            for (Field field : beforeFields) {
                Object beforeValue = before.get(field);
                if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.MicroTimestamp".equals(field.schema().name())) {
                    if (beforeValue != null) {
                        long times = (long) beforeValue / 1000;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60 * 1000)));
                        beforeJson.put(field.name(), dateTime);
                    }
                }
                else if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.NanoTimestamp".equals(field.schema().name())) {
                    if (beforeValue != null) {
                        long times = (long) beforeValue;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60 * 1000)));
                        beforeJson.put(field.name(), dateTime);
                    }
                }  else if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.Timestamp".equals(field.schema().name())) {
                    if (beforeValue != null) {
                        long times = (long) beforeValue;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60 )));
                        beforeJson.put(field.name(), dateTime);
                    }
                } else if("int32".equals(field.schema().type().getName()) && "io.debezium.time.Date".equals(field.schema().name())){
                    if(beforeValue != null) {
                        int times = (int) beforeValue;
                        String dateTime = sdf1.format(new Date(times * 24 * 60 * 60L * 1000));
                        beforeJson.put(field.name(), dateTime);
                    }
                }
                else {
                    beforeJson.put(field.name(), beforeValue);
                }
            }
        }
        //4.获取"after"数据
        Struct after = value.getStruct("after");
        JSONObject afterJson = new JSONObject();
        if (after != null) {
            Schema afterSchema = after.schema();
            List<Field> afterFields = afterSchema.fields();
            for (Field field : afterFields) {
                Object afterValue = after.get(field);
                if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.MicroTimestamp".equals(field.schema().name())) {
                    if (afterValue != null) {
                        long times = (long) afterValue / 1000;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60 * 1000)));
                        afterJson.put(field.name(), dateTime);
                    }
                }
                else if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.NanoTimestamp".equals(field.schema().name())) {
                    if (afterValue != null) {
                        long times = (long) afterValue;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60 * 1000)));
                        afterJson.put(field.name(), dateTime);
                    }
                }  else if ("int64".equals(field.schema().type().getName()) && "io.debezium.time.Timestamp".equals(field.schema().name())) {
                    if (afterValue != null) {
                        long times = (long) afterValue;
                        String dateTime = sdf.format(new Date((times - 8 * 60 * 60)));
                        afterJson.put(field.name(), dateTime);
                    }
                }
                else if("int32".equals(field.schema().type().getName()) && "io.debezium.time.Date".equals(field.schema().name())){
                    if(afterValue != null) {
                        int times = (int) afterValue;
                        String dateTime = sdf1.format(new Date(times * 24 * 60 * 60L * 1000));
                        afterJson.put(field.name(), dateTime);
                    }
                }
                else {
                    afterJson.put(field.name(), afterValue);
                }
            }
        }
        //5.获取操作类型  CREATE UPDATE DELETE
        Envelope.Operation operation = Envelope.operationFor(sourceRecord);
        String type = operation.toString().toLowerCase();
        if ("create".equals(type) || "read".equals(type)) {
            type = "insert";
        }
        //6.将字段写入JSON对象
        result.put("database", database);
        result.put("schema", schema);
        result.put("tableName", tableName);
        result.put("before", beforeJson);
        result.put("after", afterJson);
        result.put("type", type);
        //7.输出数据
        collector.collect(result.toJSONString());
    }
    @Override
    public TypeInformation<String> getProducedType() {
        return BasicTypeInfo.STRING_TYPE_INFO;
    }
}

scala code

import com.ververica.cdc.debezium.DebeziumDeserializationSchema
import com.ververica.cdc.debezium.utils.TemporalConversions
import io.debezium.time._
import org.apache.flink.api.common.typeinfo.TypeInformation
import org.apache.flink.types.Row
import org.apache.flink.util.Collector
import org.apache.kafka.connect.data.{SchemaBuilder, Struct}
import org.apache.kafka.connect.source.SourceRecord
import java.sql
import java.time.{Instant, LocalDateTime, ZoneId}
import scala.collection.JavaConverters._
import scala.util.parsing.json.JSONObject
class StructDebeziumDeserializationSchema(serverTimeZone: String) extends DebeziumDeserializationSchema[Row] {
  override def deserialize(sourceRecord: SourceRecord, collector: Collector[Row]): Unit = {
    // 解析主键
    val key = sourceRecord.key().asInstanceOf[Struct]
    val keyJs = parseStruct(key)
    // 解析值
    val value = sourceRecord.value().asInstanceOf[Struct]
    val source = value.getStruct("source")
    val before = parseStruct(value.getStruct("before"))
    val after = parseStruct(value.getStruct("after"))
    val row = Row.withNames()
    row.setField("table", s"${source.get("db")}.${source.get("table")}")
    row.setField("key", keyJs)
    row.setField("op", value.get("op"))
    row.setField("op_ts", LocalDateTime.ofInstant(Instant.ofEpochMilli(source.getInt64("ts_ms")), ZoneId.of(serverTimeZone)))
    row.setField("current_ts", LocalDateTime.ofInstant(Instant.ofEpochMilli(value.getInt64("ts_ms")), ZoneId.of(serverTimeZone)))
    row.setField("before", before)
    row.setField("after", after)
    collector.collect(row)
  }
  /** 解析[[Struct]]结构为json字符串 */
  private def parseStruct(struct: Struct): String = {
    if (struct == null) return null
    val map = struct.schema().fields().asScala.map(field => {
      val v = struct.get(field)
      val typ = field.schema().name()
      println(s"$v, $typ, ${field.name()}")
      val value = v match {
        case long if long.isInstanceOf[Long] => convertLongToTime(long.asInstanceOf[Long], typ)
        case iv if iv.isInstanceOf[Int] => convertIntToDate(iv.asInstanceOf[Int], typ)
        case iv if iv == null => null
        case _ => convertObjToTime(v, typ)
      }
      (field.name(), value)
    }).filter(_._2 != null).toMap
    JSONObject.apply(map).toString()
  }
  /** 类型转换 */
  private def convertObjToTime(obj: Any, typ: String): Any = {
    typ match {
      case Time.SCHEMA_NAME | MicroTime.SCHEMA_NAME | NanoTime.SCHEMA_NAME =>
        sql.Time.valueOf(TemporalConversions.toLocalTime(obj)).toString
      case Timestamp.SCHEMA_NAME | MicroTimestamp.SCHEMA_NAME | NanoTimestamp.SCHEMA_NAME | ZonedTimestamp.SCHEMA_NAME =>
        sql.Timestamp.valueOf(TemporalConversions.toLocalDateTime(obj, ZoneId.of(serverTimeZone))).toString
      case _ => obj
    }
  }
  /** long 转换为时间类型 */
  private def convertLongToTime(obj: Long, typ: String): Any = {
    val time_schema = SchemaBuilder.int64().name("org.apache.kafka.connect.data.Time")
    val date_schema = SchemaBuilder.int64().name("org.apache.kafka.connect.data.Date")
    val timestamp_schema = SchemaBuilder.int64().name("org.apache.kafka.connect.data.Timestamp")
    typ match {
      case Time.SCHEMA_NAME =>
        org.apache.kafka.connect.data.Time.toLogical(time_schema, obj.asInstanceOf[Int]).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalTime.toString
      case MicroTime.SCHEMA_NAME =>
        org.apache.kafka.connect.data.Time.toLogical(time_schema, (obj / 1000).asInstanceOf[Int]).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalTime.toString
      case NanoTime.SCHEMA_NAME =>
        org.apache.kafka.connect.data.Time.toLogical(time_schema, (obj / 1000 / 1000).asInstanceOf[Int]).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalTime.toString
      case Timestamp.SCHEMA_NAME =>
        val t = org.apache.kafka.connect.data.Timestamp.toLogical(timestamp_schema, obj).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalDateTime
        java.sql.Timestamp.valueOf(t).toString
      case MicroTimestamp.SCHEMA_NAME =>
        val t = org.apache.kafka.connect.data.Timestamp.toLogical(timestamp_schema, obj / 1000).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalDateTime
        java.sql.Timestamp.valueOf(t).toString
      case NanoTimestamp.SCHEMA_NAME =>
        val t = org.apache.kafka.connect.data.Timestamp.toLogical(timestamp_schema, obj / 1000 / 1000).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalDateTime
        java.sql.Timestamp.valueOf(t).toString
      case Date.SCHEMA_NAME =>
        org.apache.kafka.connect.data.Date.toLogical(date_schema, obj.asInstanceOf[Int]).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalDate.toString
      case _ => obj
    }
  }
  private def convertIntToDate(obj:Int, typ: String): Any ={
    val date_schema = SchemaBuilder.int64().name("org.apache.kafka.connect.data.Date")
    typ match {
      case Date.SCHEMA_NAME =>
        org.apache.kafka.connect.data.Date.toLogical(date_schema, obj).toInstant.atZone(ZoneId.of(serverTimeZone)).toLocalDate.toString
      case _ => obj
    }
  }
  override def getProducedType: TypeInformation[Row] = {
    TypeInformation.of(classOf[Row])
  }
}

    mysql cdc时区问题

    mysql cdc也会出现上述时区问题,Debezium默认将MySQL中datetime类型转成UTC的时间戳({@link io.debezium.time.Timestamp}),时区是写死的无法更改,导致数据库中设置的UTC+8,到kafka中变成了多八个小时的long型时间戳 Debezium默认将MySQL中的timestamp类型转成UTC的字符串。

    解决思路有两种:

    1:自定义序列化方式的时候做时区转换。
    2:自定义时间转换类,通过debezium配置文件指定转化格式。

    这里主要使用第二种方式。

    package com.zmn.schema;
    import io.debezium.spi.converter.CustomConverter;
    import io.debezium.spi.converter.RelationalColumn;
    import org.apache.kafka.connect.data.SchemaBuilder;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import java.time.*;
    import java.time.format.DateTimeFormatter;
    import java.util.Properties;
    import java.util.function.Consumer;
    /**
     * 处理Debezium时间转换的问题
     * Debezium默认将MySQL中datetime类型转成UTC的时间戳({@link io.debezium.time.Timestamp}),时区是写死的无法更改,
     * 导致数据库中设置的UTC+8,到kafka中变成了多八个小时的long型时间戳
     * Debezium默认将MySQL中的timestamp类型转成UTC的字符串。
     * | mysql                               | mysql-binlog-connector                   | debezium                          |
     * | ----------------------------------- | ---------------------------------------- | --------------------------------- |
     * | date<br>(2021-01-28)                | LocalDate<br/>(2021-01-28)               | Integer<br/>(18655)               |
     * | time<br/>(17:29:04)                 | Duration<br/>(PT17H29M4S)                | Long<br/>(62944000000)            |
     * | timestamp<br/>(2021-01-28 17:29:04) | ZonedDateTime<br/>(2021-01-28T09:29:04Z) | String<br/>(2021-01-28T09:29:04Z) |
     * | Datetime<br/>(2021-01-28 17:29:04)  | LocalDateTime<br/>(2021-01-28T17:29:04)  | Long<br/>(1611854944000)          |
     *
     * @see io.debezium.connector.mysql.converters.TinyIntOneToBooleanConverter
     */
    public class MySqlDateTimeConverter implements CustomConverter<SchemaBuilder, RelationalColumn> {
        private final static Logger logger = LoggerFactory.getLogger(MySqlDateTimeConverter.class);
        private DateTimeFormatter dateFormatter = DateTimeFormatter.ISO_DATE;
        private DateTimeFormatter timeFormatter = DateTimeFormatter.ISO_TIME;
        private DateTimeFormatter datetimeFormatter = DateTimeFormatter.ISO_DATE_TIME;
        private DateTimeFormatter timestampFormatter = DateTimeFormatter.ISO_DATE_TIME;
        private ZoneId timestampZoneId = ZoneId.systemDefault();
        @Override
        public void configure(Properties props) {
            readProps(props, "format.date", p -> dateFormatter = DateTimeFormatter.ofPattern(p));
            readProps(props, "format.time", p -> timeFormatter = DateTimeFormatter.ofPattern(p));
            readProps(props, "format.datetime", p -> datetimeFormatter = DateTimeFormatter.ofPattern(p));
            readProps(props, "format.timestamp", p -> timestampFormatter = DateTimeFormatter.ofPattern(p));
            readProps(props, "format.timestamp.zone", z -> timestampZoneId = ZoneId.of(z));
        }
        private void readProps(Properties properties, String settingKey, Consumer<String> callback) {
            String settingValue = (String) properties.get(settingKey);
            if (settingValue == null || settingValue.length() == 0) {
                return;
            }
            try {
                callback.accept(settingValue.trim());
            } catch (IllegalArgumentException | DateTimeException e) {
                logger.error("The {} setting is illegal: {}",settingKey,settingValue);
                throw e;
            }
        }
        @Override
        public void converterFor(RelationalColumn column, ConverterRegistration<SchemaBuilder> registration) {
            String sqlType = column.typeName().toUpperCase();
            SchemaBuilder schemaBuilder = null;
            Converter converter = null;
            if ("DATE".equals(sqlType)) {
                schemaBuilder = SchemaBuilder.string().optional().name("com.darcytech.debezium.date.string");
                converter = this::convertDate;
            }
            if ("TIME".equals(sqlType)) {
                schemaBuilder = SchemaBuilder.string().optional().name("com.darcytech.debezium.time.string");
                converter = this::convertTime;
            }
            if ("DATETIME".equals(sqlType)) {
                schemaBuilder = SchemaBuilder.string().optional().name("com.darcytech.debezium.datetime.string");
                converter = this::convertDateTime;
            }
            if ("TIMESTAMP".equals(sqlType)) {
                schemaBuilder = SchemaBuilder.string().optional().name("com.darcytech.debezium.timestamp.string");
                converter = this::convertTimestamp;
            }
            if (schemaBuilder != null) {
                registration.register(schemaBuilder, converter);
            }
        }
        private String convertDate(Object input) {
            if (input instanceof LocalDate) {
                return dateFormatter.format((LocalDate) input);
            }
            if (input instanceof Integer) {
                LocalDate date = LocalDate.ofEpochDay((Integer) input);
                return dateFormatter.format(date);
            }
            return null;
        }
        private String convertTime(Object input) {
            if (input instanceof Duration) {
                Duration duration = (Duration) input;
                long seconds = duration.getSeconds();
                int nano = duration.getNano();
                LocalTime time = LocalTime.ofSecondOfDay(seconds).withNano(nano);
                return timeFormatter.format(time);
            }
            return null;
        }
        private String convertDateTime(Object input) {
            if (input instanceof LocalDateTime) {
                return datetimeFormatter.format((LocalDateTime) input);
            }
            return null;
        }
        private String convertTimestamp(Object input) {
            if (input instanceof ZonedDateTime) {
                // mysql的timestamp会转成UTC存储,这里的zonedDatetime都是UTC时间
                ZonedDateTime zonedDateTime = (ZonedDateTime) input;
                LocalDateTime localDateTime = zonedDateTime.withZoneSameInstant(timestampZoneId).toLocalDateTime();
                return timestampFormatter.format(localDateTime);
            }
            return null;
        }
    }

    使用方式:

    StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
            Properties properties = new Properties();
            properties.setProperty("snapshot.mode", "schema_only"); // 增量读取
            //自定义时间转换配置
            properties.setProperty("converters", "dateConverters");
            properties.setProperty("dateConverters.type", "pg.cdc.ds.PgSQLDateTimeConverter");
            properties.setProperty("dateConverters.format.date", "yyyy-MM-dd");
            properties.setProperty("dateConverters.format.time", "HH:mm:ss");
            properties.setProperty("dateConverters.format.datetime", "yyyy-MM-dd HH:mm:ss");
            properties.setProperty("dateConverters.format.timestamp", "yyyy-MM-dd HH:mm:ss");
            properties.setProperty("dateConverters.format.timestamp.zone", "UTC+8");
            properties.setProperty("debezium.snapshot.locking.mode","none"); //全局读写锁,可能会影响在线业务,跳过锁设置        
            properties.setProperty("include.schema.changes", "true");
            // 使用flink mysql cdc 发现bigint unsigned类型的字段,capture以后转成了字符串类型,
           // 用的这个解析吧JsonDebeziumDeserializationSchema。
            properties.setProperty("bigint.unsigned.handling.mode","long");
            properties.setProperty("decimal.handling.mode","double");
            MySqlSource<String> mySqlSource = MySqlSource.<String>builder()
                    .hostname("192.168.10.102")
                    .port(3306)
                    .username("yusys")
                    .password("yusys")
                    .port(3306)
                    .databaseList("gmall")
                    .tableList("gmall.faker_user1")
                    .deserializer(new JsonDebeziumDeserializationSchema())
                    .debeziumProperties(properties)
                    .serverId(5409)
                    .build();
          SingleOutputStreamOperator<string> dataSource = env
                    .addSource(sourceFunction).setParallelism(10).name("binlog-source");
    


    相关实践学习
    基于Hologres+Flink搭建GitHub实时数据大屏
    通过使用Flink、Hologres构建实时数仓,并通过Hologres对接BI分析工具(以DataV为例),实现海量数据实时分析.
    实时计算 Flink 实战课程
    如何使用实时计算 Flink 搞定数据处理难题?实时计算 Flink 极客训练营产品、技术专家齐上阵,从开源 Flink功能介绍到实时计算 Flink 优势详解,现场实操,5天即可上手! 欢迎开通实时计算 Flink 版: https://cn.aliyun.com/product/bigdata/sc Flink Forward Asia 介绍: Flink Forward 是由 Apache 官方授权,Apache Flink Community China 支持的会议,通过参会不仅可以了解到 Flink 社区的最新动态和发展计划,还可以了解到国内外一线大厂围绕 Flink 生态的生产实践经验,是 Flink 开发者和使用者不可错过的盛会。 去年经过品牌升级后的 Flink Forward Asia 吸引了超过2000人线下参与,一举成为国内最大的 Apache 顶级项目会议。结合2020年的特殊情况,Flink Forward Asia 2020 将在12月26日以线上峰会的形式与大家见面。
    相关文章
    |
    10月前
    |
    SQL 关系型数据库 Apache
    从 Flink 到 Doris 的实时数据写入实践 —— 基于 Flink CDC 构建更实时高效的数据集成链路
    本文将深入解析 Flink-Doris-Connector 三大典型场景中的设计与实现,并结合 Flink CDC 详细介绍了整库同步的解决方案,助力构建更加高效、稳定的实时数据处理体系。
    3558 0
    从 Flink 到 Doris 的实时数据写入实践 —— 基于 Flink CDC 构建更实时高效的数据集成链路
    |
    数据采集 SQL canal
    Amoro + Flink CDC 数据融合入湖新体验
    本文总结了货拉拉高级大数据开发工程师陈政羽在Flink Forward Asia 2024上的分享,聚焦Flink CDC在货拉拉的应用与优化。内容涵盖CDC应用现状、数据入湖新体验、入湖优化及未来规划。文中详细分析了CDC在多业务场景中的实践,包括数据采集平台化、稳定性建设,以及面临的文件碎片化、Schema演进等挑战。同时介绍了基于Apache Amoro的湖仓融合架构,通过自优化服务解决小文件问题,提升数据新鲜度与读写平衡。未来将深化Paimon与Amoro的结合,打造更高效的入湖生态与自动化优化方案。
    692 1
    Amoro + Flink CDC 数据融合入湖新体验
    |
    SQL 关系型数据库 MySQL
    Flink CDC 3.4 发布, 优化高频 DDL 处理,支持 Batch 模式,新增 Iceberg 支持
    Apache Flink CDC 3.4.0 版本正式发布!经过4个月的开发,此版本强化了对高频表结构变更的支持,新增 batch 执行模式和 Apache Iceberg Sink 连接器,可将数据库数据全增量实时写入 Iceberg 数据湖。51位贡献者完成了259次代码提交,优化了 MySQL、MongoDB 等连接器,并修复多个缺陷。未来 3.5 版本将聚焦脏数据处理、数据限流等能力及 AI 生态对接。欢迎下载体验并提出反馈!
    1936 1
    Flink CDC 3.4 发布, 优化高频 DDL 处理,支持 Batch 模式,新增 Iceberg 支持
    |
    SQL API Apache
    Dinky 和 Flink CDC 在实时整库同步的探索之路
    本次分享围绕 Dinky 的整库同步技术演进,从传统数据集成方案的痛点出发,探讨了 Flink CDC Yaml 作业的探索历程。内容分为三个部分:起源、探索、未来。在起源部分,分析了传统数据集成方案中全量与增量割裂、时效性低等问题,引出 Flink CDC 的优势;探索部分详细对比了 Dinky CDC Source 和 Flink CDC Pipeline 的架构与能力,深入讲解了 YAML 作业的细节,如模式演变、数据转换等;未来部分则展望了 Dinky 对 Flink CDC 的支持与优化方向,包括 Pipeline 转换功能、Transform 扩展及实时湖仓治理等。
    1520 12
    Dinky 和 Flink CDC 在实时整库同步的探索之路
    |
    12月前
    |
    消息中间件 SQL 关系型数据库
    Flink CDC + Kafka 加速业务实时化
    Flink CDC 是一种支持流批一体的分布式数据集成工具,通过 YAML 配置实现数据传输过程中的路由与转换操作。它已从单一数据源的 CDC 数据流发展为完整的数据同步解决方案,支持 MySQL、Kafka 等多种数据源和目标端(如 Delta Lake、Iceberg)。其核心功能包括多样化数据输入链路、Schema Evolution、Transform 和 Routing 模块,以及丰富的监控指标。相比传统 SQL 和 DataStream 作业,Flink CDC 提供更灵活的 Schema 变更控制和原始 binlog 同步能力。
    |
    消息中间件 Java 关系型数据库
    Flink实战(五) - DataStream API编程(下)
    Flink实战(五) - DataStream API编程(下)
    423 0
    Flink实战(五) - DataStream API编程(下)
    |
    消息中间件 监控 Java
    Flink实战(五) - DataStream API编程(上)
    Flink实战(五) - DataStream API编程(上)
    742 0
    Flink实战(五) - DataStream API编程(上)
    |
    10月前
    |
    存储 分布式计算 数据处理
    「48小时极速反馈」阿里云实时计算Flink广招天下英雄
    阿里云实时计算Flink团队,全球领先的流计算引擎缔造者,支撑双11万亿级数据处理,推动Apache Flink技术发展。现招募Flink执行引擎、存储引擎、数据通道、平台管控及产品经理人才,地点覆盖北京、杭州、上海。技术深度参与开源核心,打造企业级实时计算解决方案,助力全球企业实现毫秒洞察。
    842 0
    「48小时极速反馈」阿里云实时计算Flink广招天下英雄
    |
    运维 数据处理 数据安全/隐私保护
    阿里云实时计算Flink版测评报告
    该测评报告详细介绍了阿里云实时计算Flink版在用户行为分析与标签画像中的应用实践,展示了其毫秒级的数据处理能力和高效的开发流程。报告还全面评测了该服务在稳定性、性能、开发运维及安全性方面的卓越表现,并对比自建Flink集群的优势。最后,报告评估了其成本效益,强调了其灵活扩展性和高投资回报率,适合各类实时数据处理需求。