gpt4 book ai didi

amazon-web-services - Kinesis分片迭代器解释

转载 作者:行者123 更新时间:2023-12-01 03:11:24 27 4
gpt4 key购买 nike

我正在尝试从 Kinesis 分片中获取记录。我循环获取分片迭代器,然后获取迭代器中的记录。我似乎得到了无数的迭代器,没有一个包含任何记录。

我的问题涉及迭代器的生命周期。鉴于 Kinesis 只保存 24 小时的数据并且迭代器应该有 5 分钟的生命周期,我不应该在任何时间点最多只能看到 288 个迭代器吗?

最佳答案

没有固定数量的分片迭代器 , 因为 分片迭代器 只是 独特的职位在给定的 碎片 , 给定的 记录 .
分片迭代器只是分片中某个点的给定记录的序列号。
根据文档 here :

A sequence number is the identifier associated with every record ingested in the stream, and is assigned when a record is put into the stream. Each stream has one or more shards

A shard iterator specifies the shard position from which to start reading data records sequentially.


所以从上面我相信分片迭代器实际上是一个基于时间戳的任意 ID。

The position is specified using the sequence number of a data record in a shard.


所以迭代器的数量实际上与给定分片中的记录数量更密切相关。

关于amazon-web-services - Kinesis分片迭代器解释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51860494/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com