fapaul commented on a change in pull request #16851:
URL: https://github.com/apache/flink/pull/16851#discussion_r691078810
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/SourceOperator.java
##########
@@ -461,8 +462,9 @@ public MetricTrackingOutput(
public void emitRecord(StreamRecord<OUT> streamRecord) throws
Exception {
output.emitRecord(streamRecord);
this.sourceMetricGroup.recordEmitted();
- if (streamRecord.hasTimestamp()) {
-
this.sourceMetricGroup.eventTimeEmitted(streamRecord.getTimestamp());
+ long timestamp = streamRecord.getTimestamp();
+ if (timestamp != TimestampAssigner.NO_TIMESTAMP) {
Review comment:
Can we keep the `streamRecord.hasTimestamp()` check? Now it implies that
`TimestampAssigner.NO_TIMESTAMP` is always the same value as the return of
`streamRecord.getTimestamp()` if no timestamp is configured.
--
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]