flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] rkhachatryan commented on a change in pull request #10151: [FLINK-14231] Handle the processing-time timers before closing operator to properly support endInput
Date Fri, 15 Nov 2019 11:25:41 GMT
rkhachatryan 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_r346751274
 
 

 ##########
 File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
 ##########
 @@ -1395,6 +1381,114 @@ private void checkpointStreamOperator(StreamOperator<?> op)
throws Exception {
 		}
 	}
 
+	/**
+	 * This class executes {@link StreamOperator#close()} of all operators in the chain
+	 * of this {@link StreamTask} one by one through the mailbox thread. Closing happens
+	 * from <b>head to tail</b> operator in the chain, contrary to {@link StreamOperator#open()}
+	 * which happens <b>tail to head</b> (see {@link #openAllOperators()}.
+	 *
+	 * <p>Before closing an operator, it quiesces the processing time service of the operator
+	 * and wait for all pending timers to finish (execute or cancel). And after closing, the
+	 * {@link org.apache.flink.streaming.api.operators.BoundedOneInput#endInput} of its next
+	 * operator is called to notify that the input is finished.
+	 */
+	protected final class ClosingOperatorOperation {
 
 Review comment:
   Seems like it is a closingOperation specific to operatorChain, so it could be in a separate
file (and receive an operatorChain and lock as parameters). StreamTask is already quite large.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message