Shard [shardId-000000000000] is not closed. This can happen if we constructed the list of shards while a reshard operation was in progress

余生颓废 提交于 2019-12-07 07:00:51

问题


I am getting this error while fetching data from Amazon kinesis Stream. I am doing below steps

  1. creating amazon kinesis Steam
  2. put the data using putRecord api of AmazonKinesisClient.
  3. Then using Worker Of KCL library to get the data from stream.

回答1:


There are a few possibilities.

  1. 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.
  2. 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

Try deleting the DynamoDB table and let the Kinesis Application (KCL) create a brand new one. Link: https://console.aws.amazon.com/dynamodb/



来源:https://stackoverflow.com/questions/27470660/shard-shardid-000000000000-is-not-closed-this-can-happen-if-we-constructed-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!