hlteoh37 commented on code in PR #151:
URL: 
https://github.com/apache/flink-connector-aws/pull/151#discussion_r1741894886


##########
flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/source/proxy/DynamoDbStreamsProxy.java:
##########
@@ -102,18 +123,23 @@ public void close() throws IOException {
         httpClient.close();
     }
 
-    private List<Shard> getShardsOfStream(String streamName, @Nullable String 
lastSeenShardId) {
-        List<Shard> shardsOfStream = new ArrayList<>();
+    private ListShardsResult getShardsOfStream(
+            String streamName, @Nullable String lastSeenShardId) {
+        ListShardsResult listShardsResult = new ListShardsResult();
 
+        String lastEvaluatedShardId = lastSeenShardId;
         DescribeStreamResponse describeStreamResponse;
         do {
-            describeStreamResponse = this.describeStream(streamName, 
lastSeenShardId);
-            List<Shard> shards = 
describeStreamResponse.streamDescription().shards();
-            shardsOfStream.addAll(shards);
-
+            describeStreamResponse = this.describeStream(streamName, 
lastEvaluatedShardId);
+            
listShardsResult.addShards(describeStreamResponse.streamDescription().shards());
+            listShardsResult.setStreamStatus(
+                    describeStreamResponse.streamDescription().streamStatus());
+            lastEvaluatedShardId =
+                    
describeStreamResponse.streamDescription().lastEvaluatedShardId();
+            LOG.debug("DescribeStream lastEvaluatedShardId: {}", 
lastEvaluatedShardId);

Review Comment:
   nice to see logging! Maybe we can add a debug log with the full list of 
shards as well



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to