flink 1.9
Flink的容错机制能够确保在出现故障时,恢复程序并继续执行它们。这些故障包括机器硬件故障、网络故障、短暂的程序故障等。
只有当source源参与了快照机制时,Flink才能确保仅一次exactly-once状态更新到用户定义的状态。下表列出了flink与绑定的连接器的状态更新保证模式。
Source | Guarantees | Notes |
Apache Kafka | exactly once | Use the appropriate Kafka connector for your version https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/kafka.html |
AWS Kinesis Streams | exactly once | https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/kinesis.html |
RabbitMQ | at most once (v 0.10) / exactly once (v 1.0) | https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/rabbitmq.html |
Twitter Streaming API | at most once | https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/twitter.html |
Google PubSub | at least once | https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/pubsub.html |
Collections | exactly once | |
Files | exactly once | |
Sockets | at most once |
具体的细节可以参考各种连接器相关内容。
https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/guarantees.html
为了确保端到端end-to-end的仅一次exactly-once记录发送(除了支持exactly-once状态语义之外),数据接收器sink需要参与检查点机制。下表列出了Flink与内置接收器sink的发送担保模式(假设只进行一次状态更新):
https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/connectors/guarantees.html