SteNicholas commented on a change in pull request #17105:
URL: https://github.com/apache/flink/pull/17105#discussion_r700828211



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/SourceOperator.java
##########
@@ -281,6 +290,21 @@ public void open() throws Exception {
                             watermarkStrategy, sourceMetricGroup);
         }
 
+        latencyMarerEmitter =
+                new LatencyMarkerEmitter<>(
+                        getProcessingTimeService(),
+                        getExecutionConfig().isLatencyTrackingConfigured()
+                                ? 
getExecutionConfig().getLatencyTrackingInterval()
+                                : getContainingTask() == null
+                                        ? 0
+                                        : getContainingTask()
+                                                .getEnvironment()
+                                                .getTaskManagerInfo()
+                                                .getConfiguration()
+                                                
.getLong(MetricOptions.LATENCY_INTERVAL),
+                        config == null ? null : getOperatorID(),

Review comment:
       @pnowojski , the null check of the task and config is to solve the 
incorrect for `SourceOperatorEventTimeTest#createTestOperator`. Therefore, I 
would like to update this method to correct the creation of `SourceOperator`.




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to