sunhaibotb commented on a change in pull request #10151: [FLINK-14231] Handle
the processing-time timers before closing operator to properly support endInput
URL: https://github.com/apache/flink/pull/10151#discussion_r347335643
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
##########
@@ -994,10 +972,18 @@ TimerService getTimerService() {
return timerService;
}
- public ProcessingTimeService getProcessingTimeService(int
operatorIndex) {
+ @VisibleForTesting
+ StreamOperator<?> getHeadOperator() {
+ return operatorChain.getHeadOperator();
+ }
+
+ public ProcessingTimeService getProcessingTimeService(StreamOperator<?>
operator, int chainIndex) {
Review comment:
`chainIndex` here is obtained through `Streamconfig#getChainIndex` (which is
generated when compiling into the job graph). I don't think it can be
guaranteed that `chainIndex` is consistent with the index in the
`OperatorChain#alloperators` array. At present, there is no data structure
mapping `chainIndex` to `StreamOperator` in `OperatorChain`, while adding this
structure to the `OperatorChain` seems to complicate things. I didn't think of
a better way. Do you have other suggestions?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services