kl0u commented on a change in pull request #13697:
URL: https://github.com/apache/flink/pull/13697#discussion_r512850046



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/BucketFactory.java
##########
@@ -37,6 +39,7 @@
                        final long initialPartCounter,
                        final BucketWriter<IN, BucketID> bucketWriter,
                        final RollingPolicy<IN, BucketID> rollingPolicy,
+                       @Nullable final FileLifeCycleListener<IN, BucketID> 
fileListener,

Review comment:
       Why not having an `Optional` instead of a `@Nullable`? I think `null` 
leads to more "fragile" code and more difficult to maintain.

##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/filesystem/BucketFactory.java
##########
@@ -45,5 +48,6 @@
                        final BucketWriter<IN, BucketID> bucketWriter,
                        final RollingPolicy<IN, BucketID> rollingPolicy,
                        final BucketState<BucketID> bucketState,
+                       @Nullable final FileLifeCycleListener<IN, BucketID> 
fileListener,

Review comment:
       Same as above.




----------------------------------------------------------------
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]


Reply via email to