【发布时间】:2015-03-09 18:22:41
【问题描述】:
将一个分片分成 2 个子分片时,父分片将关闭。预计记录处理器(此处使用 KCL)会在发生这种情况时检查点,如以下 KCL 源代码所示:
try {
recordProcessor.shutdown(recordProcessorCheckpointer, reason);
String lastCheckpointValue = recordProcessorCheckpointer.getLastCheckpointValue();
if (reason == ShutdownReason.TERMINATE) {
if ((lastCheckpointValue == null)
|| (!lastCheckpointValue.equals(SentinelCheckpoint.SHARD_END.toString()))) {
throw new IllegalArgumentException("Application didn't checkpoint at end of shard "
+ shardInfo.getShardId());
}
}
问题是:
这个检查点必不可少吗?
如果记录处理器没有检查点并吸收异常会发生什么?
我问的原因是因为在我的用例中,我想确保流中的每条记录都已处理到 s3,现在如果分片关闭,可能有尚未刷新的项目,因此我想确保他们会对子碎片的新消费者/工人感到不满?
如果我检查站,他们不会反感。
有什么想法吗?
提前致谢。
【问题讨论】:
标签: amazon-kinesis