yxu-valleytider opened a new 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 ## What is the purpose of the change This patch makes it easier to extend `StreamingFileSink`, which adopts the builder pattern as a way to construct a new `StreamingFileSink` object. It follows the technique of "recurring generic pattern" which is documented in [[1](https://community.oracle.com/blogs/emcmanus/2010/10/24/using-builder-pattern-subclasses)] and [[2](https://stackoverflow.com/questions/17164375/subclassing-a-java-builder-class)]. ## Brief change log **StreamingFileSink** - Added the builder type as the class signature for `BucketsBuilder`, `RowFormatBuilder` and `BulkFormatBuilder`. - Added a `self()` method inside `BucketsBuilder` to return the proper builder type for base classes and subclasses in the path of inheritance. - Change the construction methods to return the builder object (`self()`), instead of a new instance of the builder. - Removed `final` for a few variables as they are now set by the construction methods. ## Verifying this change This change is merely an interface change and is already covered by existing tests, such as *LocalStreamingFileSinkTest* and *BulkWriterTest*. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): (no) - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes) - The serializers: (no) - The runtime per-record code paths (performance sensitive): (no) - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no) - The S3 file system connector: (yes) it affects *StreamingFileSink* but merely an interface change. ## Documentation - Does this pull request introduce a new feature? (no) - If yes, how is the feature documented? (not applicable)
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services