Github user aljoscha commented on a diff in the pull request: https://github.com/apache/flink/pull/5563#discussion_r170596001 --- Diff: flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/AvroKeyValueSinkWriter.java --- @@ -158,7 +158,7 @@ public void open(FileSystem fs, Path path) throws IOException { @Override public void close() throws IOException { - super.close(); //the order is important since super.close flushes inside + flush(); // super.close() also does a flush if (keyValueWriter != null) { --- End diff -- I would be in favour of just having ``` @Override public void close() throws IOException { if (keyValueWriter != null) { keyValueWriter.close(); } } ``` then. It seems all usual stream/file stuff seems to close the stream that was handed in.
---