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


##########
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:
   SGTM



##########
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/EFOShardSubscribersPool.java:
##########
@@ -331,6 +331,15 @@ Instant getWatermark() {
     return minTimestamp(state.values().stream().map(ShardState::getWatermark));
   }
 
+  Instant getEventTimestamp(KinesisRecord record) {
+    List<ShardState> sharedStates = new ArrayList<>(state.values());
+
+    if (sharedStates.isEmpty()) {
+      return null;
+    }
+    return sharedStates.get(0).getEventTime(record);

Review Comment:
   SGTM



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