gguptp commented on code in PR #190:
URL: 
https://github.com/apache/flink-connector-aws/pull/190#discussion_r1977837807


##########
flink-connector-aws/flink-connector-dynamodb/src/main/java/org/apache/flink/connector/dynamodb/source/reader/PollingDynamoDbStreamsShardSplitReader.java:
##########
@@ -120,10 +175,20 @@ public RecordsWithSplitIds<Record> fetch() throws 
IOException {
                                 .sequenceNumber()));
 
         if (!isComplete) {
-            assignedSplits.add(splitState);
+            assignedSplits.add(splitContext);
         }
         return new DynamoDbStreamRecordsWithSplitIds(
-                getRecordsResponse.records().iterator(), 
splitState.getSplitId(), isComplete);
+                getRecordsResponse.records().iterator(),
+                splitContext.splitState.getSplitId(),
+                isComplete);
+    }
+
+    private void sleep(long milliseconds) throws IOException {
+        try {
+            Thread.sleep(milliseconds);
+        } catch (InterruptedException e) {
+            throw new IOException("Split reader was interrupted while 
sleeping", e);
+        }

Review Comment:
   as discussed offline, since we dont have a easy way to do this from flink, 
we will continue with a thread.sleep of 1 ms



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

Reply via email to