GitHub user tony810430 opened a pull request:

    https://github.com/apache/flink/pull/2925

    [FLINK-4574] [kinesis]Strengthen fetch interval implementation in Kinesis 
consumer

    I used Timer to implement it.
    
    If "flink.shard.getrecords.intervalmillis" is set by default value, which 
is 0, the timer will schedule ShardConsumerFetcher once and run it forever.
    If "flink.shard.getrecords.intervalmillis" is greater than 0, the timer 
will schedule ShardConsumerFetcher at a fixed ratio by using 
timer.scheduleAtFixedRate, which makes sure two consecutive function call would 
be a fixed interval.
    But if the getRecords took too much time and couldn't be finished on time, 
ShardConsumerFetcher would log the warning and drop the next delayed task.
    
    Ideally :
    |----p1----|----p2----|----p3----|
    |=====>   |====>       |====>      |
      task1         task2           task3
    
    task2 is delayed by task1: task2 will be dropped
    |----p1----|----p2----|----p3----|
    |============>      |====>      |
      task1                            task3

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tony810430/flink FLINK-4574

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2925.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2925
    
----
commit 44ef9b4df7e805a8f20b31ba55f511264820b7c1
Author: 魏偉哲 <tonywei@tonyweis-macbook-pro.local>
Date:   2016-12-02T09:15:28Z

    [FLINK-4574] Strengthen fetch interval implementation in Kinesis consumer

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to