kl0u commented on a change in pull request #9581: [FLINK-13864][streaming]:
Modify the StreamingFileSink Builder interface to allow for easier subclassing
of StreamingFileSink
URL: https://github.com/apache/flink/pull/9581#discussion_r319890643
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/StreamingFileSink.java
##########
@@ -314,25 +332,30 @@ private BulkFormatBuilder(
this.partFileSuffix =
Preconditions.checkNotNull(partFileSuffix);
}
- public StreamingFileSink.BulkFormatBuilder<IN, BucketID>
withBucketCheckInterval(long interval) {
- return new BulkFormatBuilder<>(basePath, writerFactory,
bucketAssigner, interval, bucketFactory, partFilePrefix, partFileSuffix);
+ public T withBucketCheckInterval(long interval) {
+ this.bucketCheckInterval = interval;
+ return self();
}
- public <ID> StreamingFileSink.BulkFormatBuilder<IN, ID>
withBucketAssigner(BucketAssigner<IN, ID> assigner) {
- return new BulkFormatBuilder<>(basePath, writerFactory,
Preconditions.checkNotNull(assigner), bucketCheckInterval, new
DefaultBucketFactoryImpl<>(), partFilePrefix, partFileSuffix);
+ public T withBucketAssigner(BucketAssigner<IN, BucketID>
assigner) {
Review comment:
Here you are missing the parameter type `ID`.
As described also in the comments here
https://issues.apache.org/jira/browse/FLINK-13843, this method for the bulk
formats and the `withBucketAssignerAndPolicy ()` for the row formats, are the
ones that allow the user to change the default type of the `BucketID`, so they
should stay as they are.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services