sjmittal commented on code in PR #28763:
URL: https://github.com/apache/beam/pull/28763#discussion_r1425607270


##########
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/ShardReadersPool.java:
##########
@@ -255,6 +256,16 @@ Instant getLatestRecordTimestamp() {
     return getMinTimestamp(ShardRecordsIterator::getLatestRecordTimestamp);
   }
 
+  Instant getEventTimestamp(KinesisRecord record) {
+    ImmutableList<ShardRecordsIterator> shardRecordsIterators =
+        shardIteratorsMap.get().values().asList();
+
+    if (shardRecordsIterators.isEmpty()) {
+      return null;
+    }
+    return shardRecordsIterators.get(0).getEventTime(record);

Review Comment:
   We get watermark also from `ShardRecordsIterator#getWatermark` so it seems 
logical that event timestamp is also fetched from 
`ShardRecordsIterator#getEventTime` which internally returns 
`watermarkPolicy.getTimestamp`.



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