[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (FLINK-10422) Follow AWS specs in Kinesis Consumer

eugen yushin created FLINK-10422:

             Summary: Follow AWS specs in Kinesis Consumer 
                 Key: FLINK-10422
                 URL: https://issues.apache.org/jira/browse/FLINK-10422
             Project: Flink
          Issue Type: Improvement
          Components: Kinesis Connector
    Affects Versions: 1.6.1
            Reporter: eugen yushin

*Related conversation in mailing list:*



Flink Kinesis consumer checks shards id for a particular pattern:

While this inlines with current Kinesis streams server implementation (all
 streams follows this pattern), it confronts with AWS docs:

 The unique identifier of the shard within the stream.
 Type: String
 Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern: [a-zA-Z0-9_.-]+
 Required: Yes


 We have no guarantees and can't rely on patterns other than provided in AWS
 Any custom implementation of Kinesis mock should rely on AWS manifest which
 claims ShardID to be alfanums. This prevents anyone to use Flink with such
 kind of mocks.

The reason behind the scene to use particular pattern "^shardId-
d12" is to create Flink's custom Shard comparator, filter already seen shards, and
 pass latest shard for client.listShards only to limit the scope for RPC
 call to AWS.

In the meantime, I think we can get rid of this logic at all. The current
 usage in project is:
 - fix Kinesalite bug (I've already opened an issue to cover this:
 [https://github.com/mhart/kinesalite/issues/76] and opened PR: [https://github.com/mhart/kinesalite/pull/77]). We can move this logic to
 test code base to keep production code clean for now

 - adjust last seen shard id. We can simply omit this cause' AWS client
 won't return already seen shards and we will have new ids only or nothing.

This message was sent by Atlassian JIRA