You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/06/04 11:27:31 UTC

[GitHub] [beam] aromanenko-dev commented on a change in pull request #14743: [BEAM-12225] Replace AWS API used to list shards from DescribeStream to ListShards

aromanenko-dev commented on a change in pull request #14743:
URL: https://github.com/apache/beam/pull/14743#discussion_r645497538



##########
File path: sdks/java/io/kinesis/src/main/java/org/apache/beam/sdk/io/kinesis/SimplifiedKinesisClient.java
##########
@@ -61,18 +69,33 @@
   private static final int PERIOD_GRANULARITY_IN_SECONDS = 60;
   private static final String SUM_STATISTIC = "Sum";
   private static final String STREAM_NAME_DIMENSION = "StreamName";
-  private static final int LIST_SHARDS_DESCRIBE_STREAM_MAX_ATTEMPTS = 10;
-  private static final Duration LIST_SHARDS_DESCRIBE_STREAM_INITIAL_BACKOFF =
+  private static final int LIST_SHARDS_MAX_RESULTS = 1_000;
+  private static final Duration
+      SPACING_FOR_TIMESTAMP_LIST_SHARDS_REQUEST_TO_NOT_EXCEED_TRIM_HORIZON =
+          Duration.standardMinutes(5);
+  private static final int DESCRIBE_STREAM_SUMMARY_MAX_ATTEMPTS = 10;
+  private static final Duration DESCRIBE_STREAM_SUMMARY_INITIAL_BACKOFF =
       Duration.standardSeconds(1);
+
   private final AmazonKinesis kinesis;
   private final AmazonCloudWatch cloudWatch;
   private final Integer limit;
+  private final Supplier<Instant> currentInstantSupplier;
 
   public SimplifiedKinesisClient(
       AmazonKinesis kinesis, AmazonCloudWatch cloudWatch, Integer limit) {
+    this(kinesis, cloudWatch, limit, Instant::now);

Review comment:
       You right, I was mistaken.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org