Flink, 大数据

flink问题集

1、flink-sql中消费kafka策略group-offsets

CREATE TABLE t2 (
    id BIGINT,
    ts BIGINT,
    vc BIGINT
) WITH (
    'connector' = 'kafka',
    'topic' = 't2',
    'properties.bootstrap.servers' = 'hadoop001:9092',
    'properties.group.id' = 'test-t2',
    'scan.startup.mode' = 'group-offsets',
    'format' = 'json'
);

group-offets 应该是指定分组的latest策略,最终执行的是setStartingOffsets(OffsetsInitializer.committedOffsets(OffsetResetStrategy.LATEST))

About 蓝染君

喜爱编程开发的程序猿