[ 
https://issues.apache.org/jira/browse/BEAM-13494?focusedWorklogId=699918&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-699918
 ]

ASF GitHub Bot logged work on BEAM-13494:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Dec/21 10:59
            Start Date: 22/Dec/21 10:59
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on a change in pull request 
#16288:
URL: https://github.com/apache/beam/pull/16288#discussion_r773120367



##########
File path: 
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/RateLimitPolicyFactory.java
##########
@@ -67,4 +84,55 @@ public void onSuccess(List<KinesisRecord> records) throws 
InterruptedException {
       Thread.sleep(delay.get().getMillis());
     }
   }
+
+  /**
+   * Default rate limiter that throttles reading from a shard using an 
exponential backoff if the
+   * response is empty or if the consumer is throttled by AWS.
+   */
+  class DefaultRateLimiter implements RateLimitPolicy {

Review comment:
       It would be great to add a test for this class.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 699918)
    Time Spent: 50m  (was: 40m)

> KinesisIO.read requires default rater limiter for low throughput shards
> -----------------------------------------------------------------------
>
>                 Key: BEAM-13494
>                 URL: https://issues.apache.org/jira/browse/BEAM-13494
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws, io-java-kinesis
>            Reporter: Moritz Mack
>            Priority: P2
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> In case Kinesis reads from a shared with no records available, the read loop 
> repeats unthrottled and exhausts API limits as well as CPU.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to