Github user aljoscha commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2871#discussion_r90639571
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/ContinuousFileMonitoringFunction.java
 ---
    @@ -58,12 +63,14 @@
      */
     @Internal
     public class ContinuousFileMonitoringFunction<OUT>
    -   extends RichSourceFunction<TimestampedFileInputSplit> implements 
Checkpointed<Long> {
    +   extends RichSourceFunction<TimestampedFileInputSplit> implements 
CheckpointedFunction {
     
        private static final long serialVersionUID = 1L;
     
        private static final Logger LOG = 
LoggerFactory.getLogger(ContinuousFileMonitoringFunction.class);
     
    +   private static final String FILE_MONITORING_STATE_NAME = 
"file-monitoring-state";
    --- End diff --
    
    Instead of this you could also have
    ```
    private static final ListStateDescriptor<Long> STATE_DESCRIPTOR =
        new ListStateDescriptor<>("file-monitoring-state", 
LongSerializer.INSTANCE);
    ```
    
    and then use this descriptor later directly instead of initialising with 
this field.
    
    That's just a personal style nitpick. Your version is also fine. 😃 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to