sunhaibotb commented on a change in pull request #10151: [FLINK-14231] Handle the pending processing-time timers to make endInput semantics on the operator chain strict URL: https://github.com/apache/flink/pull/10151#discussion_r373999581
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java ########## @@ -1046,10 +1046,16 @@ TimerService getTimerService() { return timerService; } - public ProcessingTimeService getProcessingTimeService(int operatorIndex) { - Preconditions.checkState(timerService != null, "The timer service has not been initialized."); - MailboxExecutor mailboxExecutor = mailboxProcessor.getMailboxExecutor(operatorIndex); - return new ProcessingTimeServiceImpl(timerService, callback -> deferCallbackToMailbox(mailboxExecutor, callback)); Review comment: If we keep this method, we need to add a map in `StreamTask` to store the corresponding `ProcessingTimeService` of all operators. In order to properly handle `quiesce` of `ProcessingTimeService`, the `ProcessingTimeService` obtained by passing the same `operatorIndex` must always be the same. The idea of introducing `ProcessingTimeServiceAware` is to store the `ProcessingTimeService` object in the operator. What do you think? @pnowojski ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services