Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4574

Strengthen fetch interval implementation in Kinesis consumer


    • Type: Improvement
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0
    • Fix Version/s: None
    • Component/s: Kinesis Connector
    • Labels:


      As pointed out by Robert Metzger, right now the fetch interval implementation in the ShardConsumer class of the Kinesis consumer can lead to much longer interval times than specified by the user, ex. say the specified fetch interval is f, it takes x to complete a getRecords() call, and y to complete processing the fetched records for emitting, than the actual interval between each fetch is actually f+x+y.

      The main problem with this is that we can never guarantee how much time has past since the last getRecords call, thus can not guarantee that returned shard iterators will not have expired the next time we use them, even if we limit the user-given value for f to not be longer than the iterator expire time.

      I propose to improve this by, per ShardConsumer, use a ScheduledExecutorService / Timer to do the fixed-interval fetching, and a separate blocking queue that collects the fetched records for emitting.


          Issue Links



              • Assignee:
                tonywei Wei-Che Wei
                tzulitai Tzu-Li (Gordon) Tai
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created: