GitHub user tzulitai opened a pull request:
FLINK-5075 [kinesis] Make Kinesis consumer fail-proof to incorrect Kinesalite API behaviour
A user reported that when tested against Kinesalite (a widely used mock Kinesis implementation), the connector was incorrectly determining already seen shards as newly discovered.
The problem was that the connector was using the API `describeStream(streamName, exclusiveStartIShardId)` to fetch shards of a stream after the provided `exclusiveStartShardId` (given as the last id of the latest shard we've already discovered), and Kinesalite behaves differently for this from the official Kinesis API.
For example, if the current complete shard list is [shard-0, shard-1, shard-2, shard-3] for "test-stream",
then `describeStream("test-stream", "shard-1")` should return: [shard-2, shard-3].
Kinesalite, however, incorrectly returns the whole list.
I've manually tested this change against Kinesalite, and shard discovery is working normally again.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tzulitai/flink
Alternatively you can review and apply these changes as the patch at:
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2822
Author: Tzu-Li (Gordon) Tai <email@example.com>
FLINK-5075 [kinesis] Make connector fail-proof to incorrect Kinesalite API behaviour