Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5927#discussion_r185932952 --- Diff: flink-connectors/flink-connector-filesystem/src/main/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSink.java --- @@ -550,6 +550,9 @@ private void openNewPartFile(Path bucketPath, BucketState<T> bucketState) throws Path inProgressPath = getInProgressPathFor(partPath); if (bucketState.writer == null) { bucketState.writer = writerTemplate.duplicate(); + if (bucketState.writer == null) { + throw new RuntimeException("Could not duplicate writer."); --- End diff -- I would add the class name of the `writerTemplate` object and that the class needs to implement the `Writer.duplicate()` method.
---