本文介绍了分片[shardId-000000000000]未关闭.如果我们在进行分片操作时构造了分片列表,则可能会发生这种情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从Amazon kinesis Stream提取数据时出现此错误.我正在按照以下步骤操作
I am getting this error while fetching data from Amazon kinesis Stream.I am doing below steps
- 创建Amazon Kinesis Steam
- 使用
AmazonKinesisClient
的putRecord
api输入数据. - 然后使用Worker Of KCL库从流中获取数据.
- creating amazon kinesis Steam
- put the data using
putRecord
api ofAmazonKinesisClient
. - Then using Worker Of KCL library to get the data from stream.
推荐答案
有几种可能.
- 您下令创建流之后,您是否等待了足够的时间才能完成?有时,创建一个碎片可能需要10分钟.由于您设法使用了
putRecord
方法,因此流和分片应该处于活动状态. - 您是否正确配置了DynamoDB?我假设您正在使用它进行Kinesis Application同步.请参阅DynamoDB表的记录内部.是否已正确填充所有列(即leaseKey,checkpoint,leaseOwner,parentShardId等)?也许数据库中的数据很旧,所以您可能正在访问封闭的分片?
- After you ordered to create the stream, did you wait long enough for completion? Sometimes, it may took 10 minutes for a shard to be created. Since you managed to use
putRecord
method, the stream and shard should be active. - Did you configure the DynamoDB correctly? I assume you are using it for your Kinesis Application synchronization. See inside the records of the DynamoDB table. Are all columns (ie. leaseKey, checkpoint, leaseOwner, parentShardId etc.) correctly filled? Maybe the data in the database is old, so you may be accessing a closed shard?
The exception you mention is here: https://github.com/awslabs/amazon-kinesis-client/blob/master/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/ShardSyncer.java#L193
尝试删除DynamoDB表,然后让Kinesis Application(KCL)创建一个全新的表.链接: https://console.aws.amazon.com/dynamodb/
Try deleting the DynamoDB table and let the Kinesis Application (KCL) create a brand new one.Link: https://console.aws.amazon.com/dynamodb/
这篇关于分片[shardId-000000000000]未关闭.如果我们在进行分片操作时构造了分片列表,则可能会发生这种情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!