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

    https://github.com/apache/flink/pull/2871#discussion_r90639653
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java
 ---
    @@ -62,6 +73,9 @@
        /** Flag to make the source cancelable */
        private volatile boolean isRunning = true;
     
    +   private transient ListState<Integer> checkpointedState;
    +
    +   private static final String FROM_ELEMENT_STATE_NAME = 
"from-element-state";
    --- End diff --
    
    Instead of this you could also have
    ```
    private static final ListStateDescriptor<Integer> STATE_DESCRIPTOR =
        new ListStateDescriptor<>("from-elements-state", 
IntSerializer.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