Tan-JiaLiang commented on code in PR #54:
URL:
https://github.com/apache/flink-connector-kafka/pull/54#discussion_r1361579797
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/KafkaPartitionSplitReader.java:
##########
@@ -110,6 +110,13 @@ public RecordsWithSplitIds<ConsumerRecord<byte[], byte[]>>
fetch() throws IOExce
markEmptySplitsAsFinished(recordsBySplits);
return recordsBySplits;
}
+
+ // Track the record fetch lag
+ consumerRecords
+ .iterator()
+ .forEachRemaining(
+ record ->
kafkaSourceReaderMetrics.recordFetched(record.timestamp()));
Review Comment:
@PatrickRen It is my pleasure that you comming to review my code.
But i am still confusing what is the difference between `EventTime` in
`currentFetchEventTimeLag` and `currentEmitEventTimeLag`?
And why `ConsumerRecord#timestamp` can directly as the event time in
https://github.com/apache/flink-connector-kafka/blob/main/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/reader/KafkaRecordEmitter.java#L52
Can you please explain it? Looking forward to your feedback!
--
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]