Github user rmetzger commented on a diff in the pull request: https://github.com/apache/flink/pull/2350#discussion_r75297857 --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileReaderOperator.java --- @@ -179,7 +195,16 @@ public void close() throws Exception { // called by the StreamTask while having it. checkpointLock.wait(); } - collector.close(); + + // finally if we are closed normally and we are operating on + // event or ingestion time, emit the max watermark indicating + // the end of the stream, like a normal source would do. + + readerContext.emitWatermark(Watermark.MAX_WATERMARK); + if (readerContext != null) { --- End diff -- if `readerContext` is null, we'll get a NPE in the line before.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---