Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/5563#discussion_r170530494
--- 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 --
alternatively, we could wrap the stream we give to avro and ignore close()
calls, and then close it ourselves. The we wouldn't rely on implementation
details of avro.
---