0%

Flink connector hippo

Flink-connector-hippo

broker分拆

获取子任务的index

1
int taskId = this.getRuntimeContext().getIndexOfThisSubtask();

checkpoint

实现CheckpointedFunction

在ListState中保存每个broker的偏移量

1
ListState<Tuple2<String, String>> offsetState;

watermark生成

hippo pullConsumer

1
2
3
4
5
6
7
ConsumerConfig config =
new ConsumerConfig(masterAddress, consumerGroup);
if (!isRestored && bootstrapFromMax) {
config.setConsumeFromMax(true);
}

messagePullConsumer = new PullMessageConsumer(config);

子任务的checkpointLock

往下游放入消息必须加锁

1
SourceContext<byte[]>.getCheckpointLock()