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



##########
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:
       Is it possible that the container task and config are null? Do we really 
need the judgement?




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