You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by fhueske <gi...@git.apache.org> on 2018/05/03 20:52:44 UTC
[GitHub] flink pull request #5927: [FLINK-8237] [BucketingSink] Better error message ...
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.
---