Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kinesis get-shard-iterator --shard-iterator-type AT_TIMESTAMP not return response #84

Open
krrrr38 opened this issue Feb 2, 2019 · 3 comments

Comments

@krrrr38
Copy link

krrrr38 commented Feb 2, 2019

start kinesatelite 1.14.0.

> npm install -g kinesalite
...
+ kinesalite@1.14.0
...
> kinesalite
Listening at http://:::4567

create stream and get shard iterator. if use --shard-iterator-type AT_TIMESTAMP, kinesatelite doen't return response.

> aws --version
aws-cli/1.16.80 Python/3.7.2 Darwin/17.7.0 botocore/1.12.70
> AWS_ACCESS_KEY_ID=a AWS_SECRET_ACCESS_KEY=b aws --region=ap-northfeast-1 --endpoint-url=http://localhost:4567 kinesis create-stream --stream-name at-timestamp-stack-test --shard-count 1
> AWS_ACCESS_KEY_ID=a AWS_SECRET_ACCESS_KEY=b aws --region=ap-northfeast-1 --endpoint-url=http://localhost:4567 kinesis list-shards --stream-name at-timestamp-stack-test
{
    "Shards": [
        {
            "ShardId": "shardId-000000000000",
            "HashKeyRange": {
                "StartingHashKey": "0",
                "EndingHashKey": "340282366920938463463374607431768211455"
            },
            "SequenceNumberRange": {
                "StartingSequenceNumber": "49592592288669974188510550010873737925033238827737546754"
            }
        }
    ]
}
> AWS_ACCESS_KEY_ID=a AWS_SECRET_ACCESS_KEY=b aws --region=ap-northfeast-1 --endpoint-url=http://localhost:4567 kinesis get-shard-iterator --stream-name at-timestamp-stack-test --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON
{
    "ShardIterator": "AAAAAAAAAAEc1n6RReP009TkSNBstrjuVYhvktfTf7PgYbrOASP3Vd4zOSH7K1bHopEsBov7sIP2mrf4eioXsChgEb3U3VdKGvBVuega72sk9UFXiFH3V4ET6Oy6nOQXKdSwUUimZ1s0vsICfGTTUhkcsHSqvzFMXlNXkj4pGbvrEUagUYfxW+eEJIbxgDHfyShktsFXho+2ggld5Gncl9jjiO3bbR40"
}
> AWS_ACCESS_KEY_ID=a AWS_SECRET_ACCESS_KEY=b aws --region=ap-northfeast-1 --endpoint-url=http://localhost:4567 kinesis get-shard-iterator --stream-name at-timestamp-stack-test --shard-id shardId-000000000000 --timestamp 2019-02-01T08:00:00.000-00:00 --shard-iterator-type AT_TIMESTAMP

(NO RESPONSE HERE. if use aws sdk, request read timeout.)

(moved from localstack/localstack#1106)


it seems that following lazy stream doesn't have item. so return no response.

return db.lazy(store.getStreamDb(data.StreamName).createReadStream(opts), cb)
.filter(function(item) { return item.value.ApproximateArrivalTimestamp >= data.Timestamp })
.head(function(item) {
iteratorSeq = item.key.split('/')[1]
cb(null, {ShardIterator: db.createShardIterator(data.StreamName, shardId, iteratorSeq)})
})

@rvdwijngaard
Copy link

+1

@xumc
Copy link

xumc commented Aug 10, 2020

+1

@bartoszspiechowicz
Copy link

bartoszspiechowicz commented Dec 16, 2020

+1
Is there any chance to solve this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants